home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / freeWAIS-sf-1.1 / configure < prev    next >
Encoding:
Text File  |  1995-01-10  |  82.6 KB  |  3,059 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 1.10 
  4. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  5.  
  6. # This configure script is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as published
  8. # by the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This script is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  14. # Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Save the original args to write them into config.status later.
  21. configure_args="$*"
  22.  
  23. # Only options that might do something get documented.
  24. ac_usage="Usage: configure [options] [host]
  25. Options: [defaults in brackets after descriptions]
  26. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  27. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  28. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  29. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  30. --help            print this message
  31. --host=HOST        configure for HOST [guessed]
  32. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  33. --quiet, --silent    do not print \`checking for...' messages
  34. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  35. --target=TARGET        configure for TARGET [TARGET=HOST]
  36. --verbose        print results of checks
  37. --version        print the version of autoconf that created configure
  38. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  39. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  40. --x-includes=DIR    X include files are in DIR
  41. --x-libraries=DIR    X library files are in DIR"
  42.  
  43. # Initialize some variables set by options.
  44. # The variables have the same names as the options, with
  45. # dashes changed to underlines.
  46. build=NONE
  47. exec_prefix=
  48. host=NONE
  49. no_create=
  50. nonopt=NONE
  51. norecursion=
  52. prefix=
  53. program_prefix=
  54. program_suffix=
  55. program_transform_name=
  56. silent=
  57. srcdir=
  58. target=NONE
  59. verbose=
  60. x_includes=
  61. x_libraries=
  62.  
  63. ac_prev=
  64. for ac_option
  65. do
  66.  
  67.   # If the previous option needs an argument, assign it.
  68.   if test -n "$ac_prev"; then
  69.     eval "$ac_prev=\$ac_option"
  70.     ac_prev=
  71.     continue
  72.   fi
  73.  
  74.   # Accept (but ignore some of) the important Cygnus configure
  75.   # options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  79.   *) ac_optarg= ;;
  80.   esac
  81.  
  82.   case "$ac_option" in
  83.  
  84.   -build | --build | --buil | --bui | --bu | --b)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -disable-* | --disable-*)
  90.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  91.     # Reject names that aren't valid shell variable names.
  92.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  93.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  94.     fi
  95.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  96.     eval "enable_${ac_feature}=no" ;;
  97.  
  98.   -enable-* | --enable-*)
  99.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  100.     # Reject names that aren't valid shell variable names.
  101.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  102.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  103.     fi
  104.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  105.     case "$ac_option" in
  106.       *=*) ;;
  107.       *) ac_optarg=yes ;;
  108.     esac
  109.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  110.  
  111.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  112.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  113.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  114.   | --exec | --exe | --ex)
  115.     ac_prev=exec_prefix ;;
  116.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  117.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  118.   | --exec=* | --exe=* | --ex=*)
  119.     exec_prefix="$ac_optarg" ;;
  120.  
  121.   -gas | --gas | --ga | --g)
  122.     with_gas=yes ;; # Obsolete; use --with-gas.
  123.  
  124.   -help | --help | --hel | --he)
  125.     cat << EOF
  126. $ac_usage
  127. EOF
  128.     exit 0 ;;
  129.  
  130.   -host | --host | --hos | --ho)
  131.     ac_prev=host ;;
  132.   -host=* | --host=* | --hos=* | --ho=*)
  133.     host="$ac_optarg" ;;
  134.  
  135.   -nfp | --nfp | --nf)
  136.     with_fp=no ;; # Obsolete; use --without-fp.
  137.  
  138.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  139.   | --no-cr | --no-c)
  140.     no_create=yes ;;
  141.  
  142.   -norecursion | --norecursion | --norecursio | --norecursi \
  143.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  144.     norecursion=yes ;;
  145.  
  146.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  147.     ac_prev=prefix ;;
  148.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  149.     prefix="$ac_optarg" ;;
  150.  
  151.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  152.   | --program-pre | --program-pr | --program-p)
  153.     ac_prev=program_prefix ;;
  154.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  155.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  156.     program_prefix="$ac_optarg" ;;
  157.  
  158.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  159.   | --program-suf | --program-su | --program-s)
  160.     ac_prev=program_suffix ;;
  161.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  162.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  163.     program_suffix="$ac_optarg" ;;
  164.  
  165.   -program-transform-name | --program-transform-name \
  166.   | --program-transform-nam | --program-transform-na \
  167.   | --program-transform-n | --program-transform- \
  168.   | --program-transform | --program-transfor \
  169.   | --program-transfo | --program-transf \
  170.   | --program-trans | --program-tran \
  171.   | --progr-tra | --program-tr | --program-t)
  172.     ac_prev=program_transform_name ;;
  173.   -program-transform-name=* | --program-transform-name=* \
  174.   | --program-transform-nam=* | --program-transform-na=* \
  175.   | --program-transform-n=* | --program-transform-=* \
  176.   | --program-transform=* | --program-transfor=* \
  177.   | --program-transfo=* | --program-transf=* \
  178.   | --program-trans=* | --program-tran=* \
  179.   | --progr-tra=* | --program-tr=* | --program-t=*)
  180.     program_transform_name="$ac_optarg" ;;
  181.  
  182.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  183.   | -silent | --silent | --silen | --sile | --sil)
  184.     silent=yes ;;
  185.  
  186.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  187.     ac_prev=srcdir ;;
  188.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  189.     srcdir="$ac_optarg" ;;
  190.  
  191.   -target | --target | --targe | --targ | --tar | --ta | --t)
  192.     ac_prev=target ;;
  193.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  194.     target="$ac_optarg" ;;
  195.  
  196.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  197.     verbose=yes ;;
  198.  
  199.   -version | --version | --versio | --versi | --vers)
  200.     echo "configure generated by autoconf version 1.10"
  201.     exit 0 ;;
  202.  
  203.   -with-* | --with-*)
  204.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  205.     # Reject names that aren't valid shell variable names.
  206.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  207.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  208.     fi
  209.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  210.     case "$ac_option" in
  211.       *=*) ;;
  212.       *) ac_optarg=yes ;;
  213.     esac
  214.     eval "with_${ac_package}='$ac_optarg'" ;;
  215.  
  216.   -without-* | --without-*)
  217.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  218.     # Reject names that aren't valid shell variable names.
  219.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  220.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  221.     fi
  222.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  223.     eval "with_${ac_package}=no" ;;
  224.  
  225.   --x) with_x=yes ;; # Obsolete; use --with-x.
  226.  
  227.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  228.   | --x-incl | --x-inc | --x-in | --x-i)
  229.     ac_prev=x_includes ;;
  230.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  231.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  232.     x_includes="$ac_optarg" ;;
  233.  
  234.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  235.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  236.     ac_prev=x_libraries ;;
  237.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  238.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  239.     x_libraries="$ac_optarg" ;;
  240.  
  241.   -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  242.     ;;
  243.  
  244.   *) 
  245.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  246.       echo "configure: warning: $ac_option: invalid host type" >&2
  247.     fi
  248.     if test "x$nonopt" != xNONE; then
  249.       echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  250.     fi
  251.     nonopt="$ac_option"
  252.     ;;
  253.  
  254.   esac
  255. done
  256.  
  257. if test -n "$ac_prev"; then
  258.   echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  259. fi
  260.  
  261. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  262. trap 'rm -fr confdefs* $ac_clean_files' 0
  263.  
  264. # Save the original args if we used an alternate arg parser.
  265. ac_configure_temp="${configure_args-$*}"
  266. # Strip out --no-create and --norecursion so they don't pile up.
  267. configure_args=
  268. for ac_arg in $ac_configure_temp; do
  269.   case "$ac_arg" in
  270.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  271.   | --no-cr | --no-c) ;;
  272.   -norecursion | --norecursion | --norecursio | --norecursi \
  273.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  274.   *) configure_args="$configure_args $ac_arg" ;;
  275.   esac
  276. done
  277.  
  278. # NLS nuisances.
  279. # These must not be set unconditionally because not all systems understand
  280. # e.g. LANG=C (notably SCO).
  281. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  282. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  283.  
  284. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  285. rm -rf conftest* confdefs.h
  286. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  287. echo > confdefs.h
  288.  
  289. # A filename unique to this package, relative to the directory that
  290. # configure is in, which we can look for to find out if srcdir is correct.
  291. ac_unique_file=README
  292.  
  293. # Find the source files, if location was not specified.
  294. if test -z "$srcdir"; then
  295.   ac_srcdir_defaulted=yes
  296.   # Try the directory containing this script, then `..'.
  297.   ac_prog=$0
  298.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  299.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  300.   srcdir=$ac_confdir
  301.   if test ! -r $srcdir/$ac_unique_file; then
  302.     srcdir=..
  303.   fi
  304. fi
  305. if test ! -r $srcdir/$ac_unique_file; then
  306.   if test x$ac_srcdir_defaulted = xyes; then
  307.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  308.   else
  309.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  310.   fi
  311. fi
  312. ac_ext=c
  313. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  314. ac_cpp='${CPP}'
  315. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  316.  
  317.  
  318.  
  319. #!/bin/sh
  320. # From configure.in ITI Header __Header
  321.  
  322.  
  323. FREE_WAIS_SF_VERSION="1.1" 
  324.  
  325.  
  326. {
  327. test -n "$verbose" && \
  328. echo "    defining" FREE_WAIS_SF_VERSION to be "$FREE_WAIS_SF_VERSION"
  329. echo "#define" FREE_WAIS_SF_VERSION "$FREE_WAIS_SF_VERSION" >> confdefs.h
  330. DEFS="$DEFS -DFREE_WAIS_SF_VERSION=$FREE_WAIS_SF_VERSION"
  331. ac_sed_defs="${ac_sed_defs}\${ac_dA}FREE_WAIS_SF_VERSION\${ac_dB}FREE_WAIS_SF_VERSION\${ac_dC}$FREE_WAIS_SF_VERSION\${ac_dD}
  332. \${ac_uA}FREE_WAIS_SF_VERSION\${ac_uB}FREE_WAIS_SF_VERSION\${ac_uC}$FREE_WAIS_SF_VERSION\${ac_uD}
  333. \${ac_eA}FREE_WAIS_SF_VERSION\${ac_eB}FREE_WAIS_SF_VERSION\${ac_eC}$FREE_WAIS_SF_VERSION\${ac_eD}
  334. "
  335. }
  336.  
  337. DISTNAME="freeWAIS-sf"
  338.  
  339.  
  340. {
  341. test -n "$verbose" && \
  342. echo "    defining" _DISTNAME_ to be "$DISTNAME"
  343. echo "#define" _DISTNAME_ "$DISTNAME" >> confdefs.h
  344. DEFS="$DEFS -D_DISTNAME_=$DISTNAME"
  345. ac_sed_defs="${ac_sed_defs}\${ac_dA}_DISTNAME_\${ac_dB}_DISTNAME_\${ac_dC}$DISTNAME\${ac_dD}
  346. \${ac_uA}_DISTNAME_\${ac_uB}_DISTNAME_\${ac_uC}$DISTNAME\${ac_uD}
  347. \${ac_eA}_DISTNAME_\${ac_eB}_DISTNAME_\${ac_eC}$DISTNAME\${ac_eD}
  348. "
  349. }
  350.  
  351.  
  352. FREE_WAIS_SF_VERSION_STRING="$DISTNAME Release $FREE_WAIS_SF_VERSION" 
  353.  
  354. {
  355. test -n "$verbose" && \
  356. echo "    defining" FREE_WAIS_SF_VERSION_STRING to be "\"$FREE_WAIS_SF_VERSION_STRING\""
  357. echo "#define" FREE_WAIS_SF_VERSION_STRING "\"$FREE_WAIS_SF_VERSION_STRING\"" >> confdefs.h
  358. DEFS="$DEFS -DFREE_WAIS_SF_VERSION_STRING=\"$FREE_WAIS_SF_VERSION_STRING\""
  359. ac_sed_defs="${ac_sed_defs}\${ac_dA}FREE_WAIS_SF_VERSION_STRING\${ac_dB}FREE_WAIS_SF_VERSION_STRING\${ac_dC}\"$FREE_WAIS_SF_VERSION_STRING\"\${ac_dD}
  360. \${ac_uA}FREE_WAIS_SF_VERSION_STRING\${ac_uB}FREE_WAIS_SF_VERSION_STRING\${ac_uC}\"$FREE_WAIS_SF_VERSION_STRING\"\${ac_uD}
  361. \${ac_eA}FREE_WAIS_SF_VERSION_STRING\${ac_eB}FREE_WAIS_SF_VERSION_STRING\${ac_eC}\"$FREE_WAIS_SF_VERSION_STRING\"\${ac_eD}
  362. "
  363. }
  364.  
  365.  
  366. echo 
  367. echo You are about to build $FREE_WAIS_SF_VERSION_STRING
  368. echo "This is *NOT* freeWAIS from CNIDR."
  369. echo
  370.  
  371. CFLAGS='-g'
  372.  
  373. if test -z "$prefix"
  374. then
  375.   test -n "$silent" || echo "checking for waisserver to derive installation directory prefix"
  376.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="$IFS:"
  377.   for ac_dir in $PATH; do
  378.     test -z "$ac_dir" && ac_dir=.
  379.     if test $ac_dir != . && test -f $ac_dir/waisserver; then
  380.       # Not all systems have dirname.
  381.       prefix=`echo $ac_dir|sed 's%/[^/][^/]*$%%'`
  382.       break
  383.     fi
  384.   done
  385.   IFS="$ac_save_ifs"
  386.   test -n "$verbose" && echo "    chose installation directory prefix ${prefix}"
  387. fi
  388.  
  389. if test -z "$CC"; then
  390.   # Extract the first word of `gcc', so it can be a program name with args.
  391.   set ac_dummy gcc; ac_word=$2
  392.   test -n "$silent" || echo "checking for $ac_word"
  393.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  394.   for ac_dir in $PATH; do
  395.     test -z "$ac_dir" && ac_dir=.
  396.     if test -f $ac_dir/$ac_word; then
  397.       CC="gcc"
  398.       break
  399.     fi
  400.   done
  401.   IFS="$ac_save_ifs"
  402. fi
  403. test -z "$CC" && CC="cc"
  404. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  405.  
  406. # Find out if we are using GNU C, under whatever name.
  407. cat > conftest.c <<EOF
  408. #ifdef __GNUC__
  409.   yes
  410. #endif
  411. EOF
  412. ${CC-cc} -E conftest.c > conftest.out 2>&1
  413. if egrep yes conftest.out >/dev/null 2>&1; then
  414.   GCC=1 # For later tests.
  415. fi
  416. rm -f conftest*
  417.  
  418. test -n "$silent" || echo "checking how to run the C preprocessor"
  419. if test -z "$CPP"; then
  420.   # This must be in double quotes, not single quotes, because CPP may get
  421.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  422.   # make.  It must be expanded now.
  423.   CPP="${CC-cc} -E"
  424.   cat > conftest.${ac_ext} <<EOF
  425. #include "confdefs.h"
  426. #include <stdio.h>
  427. Syntax Error
  428. EOF
  429. # Some shells (Coherent) do redirections in the wrong order, so need
  430. # the parens.
  431. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  432. if test -z "$ac_err"; then
  433.   :
  434. else
  435.   rm -rf conftest*
  436.   CPP="${CC-cc} -E -traditional-cpp"
  437.   cat > conftest.${ac_ext} <<EOF
  438. #include "confdefs.h"
  439. #include <stdio.h>
  440. Syntax Error
  441. EOF
  442. # Some shells (Coherent) do redirections in the wrong order, so need
  443. # the parens.
  444. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  445. if test -z "$ac_err"; then
  446.   :
  447. else
  448.   rm -rf conftest*
  449.   CPP=/lib/cpp
  450. fi
  451. rm -f conftest*
  452. fi
  453. rm -f conftest*
  454. fi
  455. test -n "$verbose" && echo "    setting CPP to $CPP"
  456.  
  457. if test -z "$PCPP"; then
  458.   # Extract the first word of `cpp', so it can be a program name with args.
  459.   set ac_dummy cpp; ac_word=$2
  460.   test -n "$silent" || echo "checking for $ac_word"
  461.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  462.   for ac_dir in $PATH; do
  463.     test -z "$ac_dir" && ac_dir=.
  464.     if test -f $ac_dir/$ac_word; then
  465.       PCPP="$dir/$word"
  466.       break
  467.     fi
  468.   done
  469.   IFS="$ac_save_ifs"
  470. fi
  471. test -z "$PCPP" && PCPP="PCPP=$CPP"
  472. test -n "$PCPP" && test -n "$verbose" && echo "    setting PCPP to $PCPP"
  473.  
  474. SAVE_PATH=$PATH 
  475. PATH="${PATH} /lib /usr/lib"
  476. if test -z "$PCPP"; then
  477.   # Extract the first word of `cpp', so it can be a program name with args.
  478.   set ac_dummy cpp; ac_word=$2
  479.   test -n "$silent" || echo "checking for $ac_word"
  480.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  481.   for ac_dir in $PATH; do
  482.     test -z "$ac_dir" && ac_dir=.
  483.     if test -f $ac_dir/$ac_word; then
  484.       PCPP=""
  485.       break
  486.     fi
  487.   done
  488.   IFS="$ac_save_ifs"
  489. fi
  490.  
  491. test -n "$PCPP" && test -n "$verbose" && echo "    setting PCPP to $PCPP"
  492.  
  493. PATH=$SAVE_PATH 
  494. test -n "$silent" || echo "checking for HPUX"
  495. cat > conftest.${ac_ext} <<EOF
  496. #include "confdefs.h"
  497. #ifdef hpux || __hpux
  498.   yes
  499. #endif
  500.  
  501. EOF
  502. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  503. if egrep "yes" conftest.out >/dev/null 2>&1; then
  504.   rm -rf conftest*
  505.   
  506. {
  507. test -n "$verbose" && \
  508. echo "    defining _HPUX_SOURCE"
  509. echo "#define" _HPUX_SOURCE "1" >> confdefs.h
  510. DEFS="$DEFS -D_HPUX_SOURCE=1"
  511. ac_sed_defs="${ac_sed_defs}\${ac_dA}_HPUX_SOURCE\${ac_dB}_HPUX_SOURCE\${ac_dC}1\${ac_dD}
  512. \${ac_uA}_HPUX_SOURCE\${ac_uB}_HPUX_SOURCE\${ac_uC}1\${ac_uD}
  513. \${ac_eA}_HPUX_SOURCE\${ac_eB}_HPUX_SOURCE\${ac_eC}1\${ac_eD}
  514. "
  515. }
  516.  
  517.  
  518. fi
  519. rm -f conftest*
  520.  
  521.  
  522. test -n "$silent" || echo "checking for minix/config.h"
  523. cat > conftest.${ac_ext} <<EOF
  524. #include "confdefs.h"
  525. #include <minix/config.h>
  526. EOF
  527. # Some shells (Coherent) do redirections in the wrong order, so need
  528. # the parens.
  529. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  530. if test -z "$ac_err"; then
  531.   rm -rf conftest*
  532.   MINIX=1
  533.  
  534. fi
  535. rm -f conftest*
  536.  
  537. # The Minix shell can't assign to the same variable on the same line!
  538. if test -n "$MINIX"; then
  539.   
  540. {
  541. test -n "$verbose" && \
  542. echo "    defining _POSIX_SOURCE"
  543. echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  544. DEFS="$DEFS -D_POSIX_SOURCE=1"
  545. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  546. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  547. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  548. "
  549. }
  550.  
  551.   
  552. {
  553. test -n "$verbose" && \
  554. echo "    defining" _POSIX_1_SOURCE to be "2"
  555. echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h
  556. DEFS="$DEFS -D_POSIX_1_SOURCE=2"
  557. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD}
  558. \${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD}
  559. \${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD}
  560. "
  561. }
  562.  
  563.   
  564. {
  565. test -n "$verbose" && \
  566. echo "    defining _MINIX"
  567. echo "#define" _MINIX "1" >> confdefs.h
  568. DEFS="$DEFS -D_MINIX=1"
  569. ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD}
  570. \${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD}
  571. \${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD}
  572. "
  573. }
  574.  
  575. fi
  576.  
  577. test -n "$silent" || echo "checking for POSIXized ISC"
  578. if test -d /etc/conf/kconfig.d &&
  579.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  580. then
  581.   ISC=1 # If later tests want to check for ISC.
  582.   
  583. {
  584. test -n "$verbose" && \
  585. echo "    defining _POSIX_SOURCE"
  586. echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  587. DEFS="$DEFS -D_POSIX_SOURCE=1"
  588. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  589. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  590. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  591. "
  592. }
  593.  
  594.   if test -n "$GCC"; then
  595.     CC="$CC -posix"
  596.   else
  597.     CC="$CC -Xp"
  598.   fi
  599. fi
  600.  
  601. test -n "$silent" || echo "checking for AIX"
  602. cat > conftest.${ac_ext} <<EOF
  603. #include "confdefs.h"
  604. #ifdef _AIX
  605.   yes
  606. #endif
  607.  
  608. EOF
  609. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  610. if egrep "yes" conftest.out >/dev/null 2>&1; then
  611.   rm -rf conftest*
  612.   
  613. {
  614. test -n "$verbose" && \
  615. echo "    defining _ALL_SOURCE"
  616. echo "#define" _ALL_SOURCE "1" >> confdefs.h
  617. DEFS="$DEFS -D_ALL_SOURCE=1"
  618. ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD}
  619. \${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD}
  620. \${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD}
  621. "
  622. }
  623.  
  624.  
  625. fi
  626. rm -f conftest*
  627.  
  628.  
  629. if test "$CC" = "gcc" ; then
  630.    AIX=`echo "$DEFS" | grep '_ALL_SOURCE'`;
  631.    if test "$AIX" != "" ; then
  632.         echo "INFO: will use cc on AIX"
  633.         CC=cc
  634.    fi
  635. fi
  636. ac_save_LIBS="${LIBS}"
  637. LIBS="${LIBS} -lseq"
  638. ac_have_lib=""
  639. test -n "$silent" || echo "checking for -lseq"
  640. cat > conftest.${ac_ext} <<EOF
  641. #include "confdefs.h"
  642.  
  643. int main() { return 0; }
  644. int t() { main();; return 0; }
  645. EOF
  646. if eval $ac_compile; then
  647.   rm -rf conftest*
  648.   ac_have_lib="1"
  649.  
  650. fi
  651. rm -f conftest*
  652. LIBS="${ac_save_LIBS}"
  653. if test -n "${ac_have_lib}"; then
  654.    :; LIBS="$LIBS -lseq"
  655. else
  656.    :; 
  657. fi
  658.  
  659.  
  660. ac_save_LIBS="${LIBS}"
  661. LIBS="${LIBS} -lsun"
  662. ac_have_lib=""
  663. test -n "$silent" || echo "checking for -lsun"
  664. cat > conftest.${ac_ext} <<EOF
  665. #include "confdefs.h"
  666.  
  667. int main() { return 0; }
  668. int t() { main();; return 0; }
  669. EOF
  670. if eval $ac_compile; then
  671.   rm -rf conftest*
  672.   ac_have_lib="1"
  673.  
  674. fi
  675. rm -f conftest*
  676. LIBS="${ac_save_LIBS}"
  677. if test -n "${ac_have_lib}"; then
  678.    :; LIBS="$LIBS -lsun"
  679. else
  680.    :; 
  681. fi
  682.  
  683.  
  684. ac_save_LIBS="${LIBS}"
  685. LIBS="${LIBS} -lintl"
  686. ac_have_lib=""
  687. test -n "$silent" || echo "checking for -lintl"
  688. cat > conftest.${ac_ext} <<EOF
  689. #include "confdefs.h"
  690.  
  691. int main() { return 0; }
  692. int t() { main();; return 0; }
  693. EOF
  694. if eval $ac_compile; then
  695.   rm -rf conftest*
  696.   ac_have_lib="1"
  697.  
  698. fi
  699. rm -f conftest*
  700. LIBS="${ac_save_LIBS}"
  701. if test -n "${ac_have_lib}"; then
  702.    :; LIBS="$LIBS -lintl"
  703. else
  704.    :; 
  705. fi
  706.  
  707.  
  708. test -n "$silent" || echo "checking for directory library header"
  709. ac_dir_header=
  710. if test -z "$ac_dir_header"; then
  711.   test -n "$silent" || echo "checking for dirent.h"
  712. cat > conftest.${ac_ext} <<EOF
  713. #include "confdefs.h"
  714. #include <sys/types.h>
  715. #include <dirent.h>
  716. int main() { return 0; }
  717. int t() { DIR *dirp = 0;; return 0; }
  718. EOF
  719. if eval $ac_compile; then
  720.   rm -rf conftest*
  721.   
  722. {
  723. test -n "$verbose" && \
  724. echo "    defining DIRENT"
  725. echo "#define" DIRENT "1" >> confdefs.h
  726. DEFS="$DEFS -DDIRENT=1"
  727. ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
  728. \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
  729. \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
  730. "
  731. }
  732.  ac_dir_header=dirent.h
  733.  
  734. fi
  735. rm -f conftest*
  736. fi
  737. if test -z "$ac_dir_header"; then
  738.   test -n "$silent" || echo "checking for sys/ndir.h"
  739. cat > conftest.${ac_ext} <<EOF
  740. #include "confdefs.h"
  741. #include <sys/types.h>
  742. #include <sys/ndir.h>
  743. int main() { return 0; }
  744. int t() { DIR *dirp = 0;; return 0; }
  745. EOF
  746. if eval $ac_compile; then
  747.   rm -rf conftest*
  748.   
  749. {
  750. test -n "$verbose" && \
  751. echo "    defining SYSNDIR"
  752. echo "#define" SYSNDIR "1" >> confdefs.h
  753. DEFS="$DEFS -DSYSNDIR=1"
  754. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
  755. \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
  756. \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
  757. "
  758. }
  759.  ac_dir_header=sys/ndir.h
  760.  
  761. fi
  762. rm -f conftest*
  763. fi
  764. if test -z "$ac_dir_header"; then
  765.   test -n "$silent" || echo "checking for sys/dir.h"
  766. cat > conftest.${ac_ext} <<EOF
  767. #include "confdefs.h"
  768. #include <sys/types.h>
  769. #include <sys/dir.h>
  770. int main() { return 0; }
  771. int t() { DIR *dirp = 0;; return 0; }
  772. EOF
  773. if eval $ac_compile; then
  774.   rm -rf conftest*
  775.   
  776. {
  777. test -n "$verbose" && \
  778. echo "    defining SYSDIR"
  779. echo "#define" SYSDIR "1" >> confdefs.h
  780. DEFS="$DEFS -DSYSDIR=1"
  781. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
  782. \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
  783. \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
  784. "
  785. }
  786.  ac_dir_header=sys/dir.h
  787.  
  788. fi
  789. rm -f conftest*
  790. fi
  791. if test -z "$ac_dir_header"; then
  792.   test -n "$silent" || echo "checking for ndir.h"
  793. cat > conftest.${ac_ext} <<EOF
  794. #include "confdefs.h"
  795. #include <sys/types.h>
  796. #include <ndir.h>
  797. int main() { return 0; }
  798. int t() { DIR *dirp = 0;; return 0; }
  799. EOF
  800. if eval $ac_compile; then
  801.   rm -rf conftest*
  802.   
  803. {
  804. test -n "$verbose" && \
  805. echo "    defining NDIR"
  806. echo "#define" NDIR "1" >> confdefs.h
  807. DEFS="$DEFS -DNDIR=1"
  808. ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
  809. \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
  810. \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
  811. "
  812. }
  813.  ac_dir_header=ndir.h
  814.  
  815. fi
  816. rm -f conftest*
  817. fi
  818.  
  819. test -n "$silent" || echo "checking for closedir return value"
  820. cat > conftest.${ac_ext} <<EOF
  821. #include "confdefs.h"
  822. #include <sys/types.h>
  823. #include <$ac_dir_header>
  824. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  825. EOF
  826. eval $ac_compile
  827. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  828.   :
  829. else
  830.   
  831. {
  832. test -n "$verbose" && \
  833. echo "    defining VOID_CLOSEDIR"
  834. echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
  835. DEFS="$DEFS -DVOID_CLOSEDIR=1"
  836. ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
  837. \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
  838. \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
  839. "
  840. }
  841.  
  842. fi
  843. rm -fr conftest*
  844.  
  845. test -n "$silent" || echo "checking for Xenix"
  846. cat > conftest.${ac_ext} <<EOF
  847. #include "confdefs.h"
  848. #if defined(M_XENIX) && !defined(M_UNIX)
  849.   yes
  850. #endif
  851.  
  852. EOF
  853. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  854. if egrep "yes" conftest.out >/dev/null 2>&1; then
  855.   rm -rf conftest*
  856.   XENIX=1
  857.  
  858. fi
  859. rm -f conftest*
  860.  
  861. if test -n "$XENIX"; then
  862.   LIBS="$LIBS -lx"
  863.   case "$DEFS" in
  864.   *SYSNDIR*) ;;
  865.   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  866.   esac
  867. fi
  868.  
  869. COMPILER_VERSION=`$CC -v 2>&1 | sed -e '1 d'`
  870. if test "$COMPILER_VERSION" = "" ; then
  871.    COMPILER_VERSION=$CC
  872. fi
  873.  
  874. {
  875. test -n "$verbose" && \
  876. echo "    defining" COMPILER_VERSION to be "\"$COMPILER_VERSION\""
  877. echo "#define" COMPILER_VERSION "\"$COMPILER_VERSION\"" >> confdefs.h
  878. DEFS="$DEFS -DCOMPILER_VERSION=\"$COMPILER_VERSION\""
  879. ac_sed_defs="${ac_sed_defs}\${ac_dA}COMPILER_VERSION\${ac_dB}COMPILER_VERSION\${ac_dC}\"$COMPILER_VERSION\"\${ac_dD}
  880. \${ac_uA}COMPILER_VERSION\${ac_uB}COMPILER_VERSION\${ac_uC}\"$COMPILER_VERSION\"\${ac_uD}
  881. \${ac_eA}COMPILER_VERSION\${ac_eB}COMPILER_VERSION\${ac_eC}\"$COMPILER_VERSION\"\${ac_eD}
  882. "
  883. }
  884.  
  885. if test -n "$GCC"; then
  886.   test -n "$silent" || echo "checking whether -traditional is needed"
  887.   ac_pattern="Autoconf.*'x'"
  888.   ac_prog='#include <sgtty.h>
  889. Autoconf TIOCGETP'
  890.   cat > conftest.${ac_ext} <<EOF
  891. #include "confdefs.h"
  892. $ac_prog
  893. EOF
  894. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  895. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  896.   rm -rf conftest*
  897.   ac_need_trad=1
  898.  
  899. fi
  900. rm -f conftest*
  901.  
  902.  
  903.   if test -z "$ac_need_trad"; then
  904.     ac_prog='#include <termio.h>
  905. Autoconf TCGETA'
  906.     cat > conftest.${ac_ext} <<EOF
  907. #include "confdefs.h"
  908. $ac_prog
  909. EOF
  910. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  911. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  912.   rm -rf conftest*
  913.   ac_need_trad=1
  914.  
  915. fi
  916. rm -f conftest*
  917.  
  918.   fi
  919.   test -n "$ac_need_trad" && CC="$CC -traditional"
  920. fi
  921.  
  922. if test -z "$RANLIB"; then
  923.   # Extract the first word of `ranlib', so it can be a program name with args.
  924.   set ac_dummy ranlib; ac_word=$2
  925.   test -n "$silent" || echo "checking for $ac_word"
  926.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  927.   for ac_dir in $PATH; do
  928.     test -z "$ac_dir" && ac_dir=.
  929.     if test -f $ac_dir/$ac_word; then
  930.       RANLIB="ranlib"
  931.       break
  932.     fi
  933.   done
  934.   IFS="$ac_save_ifs"
  935. fi
  936. test -z "$RANLIB" && RANLIB=":"
  937. test -n "$RANLIB" && test -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  938.  
  939. if test "$srcdir" = "." ; then
  940.     srcdir=`pwd`;
  941. fi      
  942. # Make sure to not get the incompatible SysV /etc/install and
  943. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  944. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  945. # or the AFS install, which mishandles nonexistent args, or
  946. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  947. # `staff', or /sbin/install on IRIX which has incompatible command-line
  948. # syntax.  Sigh.
  949. #
  950. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  951. #     anyway.
  952. # This turns out not to be true, so the mere pathname isn't an indication
  953. # of whether the program works.  What we really need is a set of tests for
  954. # the install program to see if it actually works in all the required ways.
  955. #
  956. # Avoid using ./install, which might have been erroneously created
  957. # by make from ./install.sh.
  958. if test -z "${INSTALL}"; then
  959.   test -n "$silent" || echo "checking for a BSD compatible install"
  960.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  961.   for ac_dir in $PATH; do
  962.     case "$ac_dir" in
  963.     ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  964.     *)
  965.       # OSF1 and SCO ODT 3.0 have their own names for install.
  966.       for ac_prog in installbsd scoinst install; do
  967.         if test -f $ac_dir/$ac_prog; then
  968.       if test $ac_prog = install &&
  969.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  970.         # AIX install.  It has an incompatible calling convention.
  971.         # OSF/1 installbsd also uses dspmsg, but is usable.
  972.         :
  973.       else
  974.         INSTALL="$ac_dir/$ac_prog -c"
  975.         break 2
  976.       fi
  977.     fi
  978.       done
  979.       ;;
  980.     esac
  981.   done
  982.   IFS="$ac_save_ifs"
  983. fi
  984.  
  985. if test -z "$INSTALL"; then
  986.   # As a last resort, use the slow shell script.
  987.   for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
  988.     if test -f $ac_dir/install.sh; then
  989.       INSTALL=$ac_dir/install.sh; break
  990.     fi
  991.   done
  992. fi
  993. if test -z "$INSTALL"; then
  994.   echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
  995. fi
  996. test -n "$verbose" && echo "    setting INSTALL to $INSTALL"
  997.  
  998. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  999. # It thinks the first close brace ends the variable substitution.
  1000. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1001. test -n "$verbose" && echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  1002.  
  1003. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1004. test -n "$verbose" && echo "    setting INSTALL_DATA to $INSTALL_DATA"
  1005.  
  1006. if test -z "${INSTALL}"; then
  1007.     echo "Did not find an install which i would trust. Please add it to"
  1008.     echo "config.status after this ./configure run."
  1009.     echo ""
  1010.     echo "A valid setting could be:"
  1011.     echo ""
  1012.     echo "INSTALL='/usr/bin/install -c'"
  1013. else
  1014.     echo "Will use \"${INSTALL}\" for installation."
  1015. fi
  1016. # If we find X, set shell vars x_includes and x_libraries to the paths.
  1017. no_x=true
  1018. if test "x$with_x" != xno; then
  1019. test -n "$silent" || echo "checking for X include and library files with xmkmf"
  1020. rm -fr conftestdir
  1021. if mkdir conftestdir; then
  1022.   cd conftestdir
  1023.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1024.   cat > Imakefile <<'EOF'
  1025. acfindx:
  1026.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1027. EOF
  1028.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1029.     no_x=
  1030.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1031.     eval `make acfindx 2>/dev/null | grep -v make`
  1032.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1033.     if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
  1034.     then
  1035.       ac_im_usrlibdir=$ac_im_libdir
  1036.     fi
  1037.     case "$ac_im_incroot" in
  1038.     /usr/include) ;;
  1039.     *) test -z "$x_includes" && x_includes="$ac_im_incroot" ;;
  1040.     esac
  1041.     case "$ac_im_usrlibdir" in
  1042.     /usr/lib | /lib) ;;
  1043.     *) test -z "$x_libraries" && x_libraries="$ac_im_usrlibdir" ;;
  1044.     esac
  1045.   fi
  1046.   cd ..
  1047.   rm -fr conftestdir
  1048. fi
  1049.  
  1050. if test -z "$ac_im_usrlibdir"; then
  1051. test -n "$silent" || echo "checking for X include and library files directly"
  1052. if test ".$x_direct_test_library" = . ; then
  1053.    x_direct_test_library='Xt'
  1054. fi
  1055. if test ".$x_direct_test_include" = . ; then
  1056.    x_direct_test_include='X11/Intrinsic.h'
  1057. fi
  1058. cat > conftest.${ac_ext} <<EOF
  1059. #include "confdefs.h"
  1060. #include <$x_direct_test_include>
  1061. EOF
  1062. # Some shells (Coherent) do redirections in the wrong order, so need
  1063. # the parens.
  1064. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1065. if test -z "$ac_err"; then
  1066.   rm -rf conftest*
  1067.   no_x=
  1068.  
  1069. else
  1070.   rm -rf conftest*
  1071.   for ac_dir in               \
  1072.     /usr/X11R6/include        \
  1073.     /usr/X11R5/include        \
  1074.     /usr/X11R4/include        \
  1075.                               \
  1076.     /usr/include/X11R6        \
  1077.     /usr/include/X11R5        \
  1078.     /usr/include/X11R4        \
  1079.                               \
  1080.     /usr/local/X11R6/include  \
  1081.     /usr/local/X11R5/include  \
  1082.     /usr/local/X11R4/include  \
  1083.                               \
  1084.     /usr/local/include/X11R6  \
  1085.     /usr/local/include/X11R5  \
  1086.     /usr/local/include/X11R4  \
  1087.                               \
  1088.     /usr/X11/include          \
  1089.     /usr/include/X11          \
  1090.     /usr/local/X11/include    \
  1091.     /usr/local/include/X11    \
  1092.                               \
  1093.     /usr/X386/include         \
  1094.     /usr/x386/include         \
  1095.     /usr/XFree86/include/X11  \
  1096.                               \
  1097.     /usr/include              \
  1098.     /usr/local/include        \
  1099.     /usr/unsupported/include  \
  1100.     /usr/athena/include       \
  1101.     /usr/local/x11r5/include  \
  1102.     /usr/lpp/Xamples/include  \
  1103.                               \
  1104.     /usr/openwin/include      \
  1105.     /usr/openwin/share/include \
  1106.     ; \
  1107.   do
  1108.     if test -r "$ac_dir/$x_direct_test_include"; then
  1109.       test -z "$x_includes" && x_includes=$ac_dir
  1110.       no_x=
  1111.       break
  1112.     fi
  1113.   done
  1114. fi
  1115. rm -f conftest*
  1116.  
  1117. # Check for the libraries.  First see if replacing the `include' by
  1118. # `lib' works.
  1119. ac_save_LIBS="${LIBS}"
  1120. LIBS="${LIBS} -l"$x_direct_test_library""
  1121. ac_have_lib=""
  1122. test -n "$silent" || echo "checking for -l"$x_direct_test_library""
  1123. cat > conftest.${ac_ext} <<EOF
  1124. #include "confdefs.h"
  1125.  
  1126. int main() { return 0; }
  1127. int t() { main();; return 0; }
  1128. EOF
  1129. if eval $ac_compile; then
  1130.   rm -rf conftest*
  1131.   ac_have_lib="1"
  1132.  
  1133. fi
  1134. rm -f conftest*
  1135. LIBS="${ac_save_LIBS}"
  1136. if test -n "${ac_have_lib}"; then
  1137.    :; no_x=
  1138. else
  1139.    :; for ac_dir in `echo "$x_includes" | sed s/include/lib/` \
  1140.     /usr/X11R6/lib        \
  1141.     /usr/X11R5/lib        \
  1142.     /usr/X11R4/lib        \
  1143.                           \
  1144.     /usr/lib/X11R6        \
  1145.     /usr/lib/X11R5        \
  1146.     /usr/lib/X11R4        \
  1147.                           \
  1148.     /usr/local/X11R6/lib  \
  1149.     /usr/local/X11R5/lib  \
  1150.     /usr/local/X11R4/lib  \
  1151.                           \
  1152.     /usr/local/lib/X11R6  \
  1153.     /usr/local/lib/X11R5  \
  1154.     /usr/local/lib/X11R4  \
  1155.                           \
  1156.     /usr/X11/lib          \
  1157.     /usr/lib/X11          \
  1158.     /usr/local/X11/lib    \
  1159.     /usr/local/lib/X11    \
  1160.                           \
  1161.     /usr/X386/lib         \
  1162.     /usr/x386/lib         \
  1163.     /usr/XFree86/lib/X11  \
  1164.                           \
  1165.     /usr/lib              \
  1166.     /usr/local/lib        \
  1167.     /usr/unsupported/lib  \
  1168.     /usr/athena/lib       \
  1169.     /usr/local/x11r5/lib  \
  1170.     /usr/lpp/Xamples/lib  \
  1171.                           \
  1172.     /usr/openwin/lib      \
  1173.     /usr/openwin/share/lib \
  1174.     ; \
  1175. do
  1176.   for ac_extension in a so sl; do
  1177.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1178.       test -z "$x_libraries" && x_libraries=$ac_dir
  1179.       no_x=
  1180.       break 2
  1181.     fi
  1182.   done
  1183. done
  1184. fi
  1185.  
  1186. fi
  1187. test -n "$x_includes" && test -n "$verbose" && echo "    X11 headers are in $x_includes"
  1188. test -n "$x_libraries" && test -n "$verbose" && echo "    X11 libraries are in $x_libraries"
  1189. fi
  1190.  
  1191. if test -z "$DIFF"; then
  1192.   # Extract the first word of `diff', so it can be a program name with args.
  1193.   set ac_dummy diff; ac_word=$2
  1194.   test -n "$silent" || echo "checking for $ac_word"
  1195.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1196.   for ac_dir in $PATH; do
  1197.     test -z "$ac_dir" && ac_dir=.
  1198.     if test -f $ac_dir/$ac_word; then
  1199.       DIFF="diff"
  1200.       break
  1201.     fi
  1202.   done
  1203.   IFS="$ac_save_ifs"
  1204. fi
  1205. test -z "$DIFF" && DIFF=":"
  1206. test -n "$DIFF" && test -n "$verbose" && echo "    setting DIFF to $DIFF"
  1207.  
  1208. if test "$DIFF" = ":" ; then
  1209.     DIFF=cmp
  1210. fi
  1211. if test -z "$LEX"; then
  1212.   # Extract the first word of `flex', so it can be a program name with args.
  1213.   set ac_dummy flex; ac_word=$2
  1214.   test -n "$silent" || echo "checking for $ac_word"
  1215.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1216.   for ac_dir in $PATH; do
  1217.     test -z "$ac_dir" && ac_dir=.
  1218.     if test -f $ac_dir/$ac_word; then
  1219.       LEX="flex"
  1220.       break
  1221.     fi
  1222.   done
  1223.   IFS="$ac_save_ifs"
  1224. fi
  1225. test -z "$LEX" && LEX="lex"
  1226. test -n "$LEX" && test -n "$verbose" && echo "    setting LEX to $LEX"
  1227.  
  1228. if test -z "$LEXLIB"
  1229. then
  1230.   case "$LEX" in
  1231.   flex*) ac_save_LIBS="${LIBS}"
  1232. LIBS="${LIBS} -lfl"
  1233. ac_have_lib=""
  1234. test -n "$silent" || echo "checking for -lfl"
  1235. cat > conftest.${ac_ext} <<EOF
  1236. #include "confdefs.h"
  1237.  
  1238. int main() { return 0; }
  1239. int t() { main();; return 0; }
  1240. EOF
  1241. if eval $ac_compile; then
  1242.   rm -rf conftest*
  1243.   ac_have_lib="1"
  1244.  
  1245. fi
  1246. rm -f conftest*
  1247. LIBS="${ac_save_LIBS}"
  1248. if test -n "${ac_have_lib}"; then
  1249.    :; LEXLIB="-lfl"
  1250. else
  1251.    :; 
  1252. fi
  1253.  ;;
  1254.   *) LEXLIB="-ll" ;;
  1255.   esac
  1256. fi
  1257. test -n "$verbose" && echo "    setting LEXLIB to $LEXLIB"
  1258.  
  1259. for ac_prog in 'bison -y' byacc
  1260. do
  1261. if test -z "$YACC"; then
  1262.   # Extract the first word of `$ac_prog', so it can be a program name with args.
  1263.   set ac_dummy $ac_prog; ac_word=$2
  1264.   test -n "$silent" || echo "checking for $ac_word"
  1265.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1266.   for ac_dir in $PATH; do
  1267.     test -z "$ac_dir" && ac_dir=.
  1268.     if test -f $ac_dir/$ac_word; then
  1269.       YACC="$ac_prog"
  1270.       break
  1271.     fi
  1272.   done
  1273.   IFS="$ac_save_ifs"
  1274. fi
  1275.  
  1276. test -n "$YACC" && test -n "$verbose" && echo "    setting YACC to $YACC"
  1277.  
  1278. test -n "$YACC" && break
  1279. done
  1280. test -n "$YACC" || YACC="yacc"
  1281.  
  1282. if test -z "$UNCOMPRESSOR"; then
  1283.   # Extract the first word of `zcat', so it can be a program name with args.
  1284.   set ac_dummy zcat; ac_word=$2
  1285.   test -n "$silent" || echo "checking for $ac_word"
  1286.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1287.   for ac_dir in $PATH; do
  1288.     test -z "$ac_dir" && ac_dir=.
  1289.     if test -f $ac_dir/$ac_word; then
  1290.       UNCOMPRESSOR="$ac_dir/$ac_word"
  1291.       break
  1292.     fi
  1293.   done
  1294.   IFS="$ac_save_ifs"
  1295. fi
  1296. test -z "$UNCOMPRESSOR" && UNCOMPRESSOR=""zcat""
  1297. test -n "$UNCOMPRESSOR" && test -n "$verbose" && echo "    setting UNCOMPRESSOR to $UNCOMPRESSOR"
  1298.  
  1299. if test "$UNCOMPRESSOR" = "zcat" ; then
  1300.     echo "Warning: did not found \"zcat\" in your path"
  1301. else
  1302.     echo "Found zcat: \"$UNCOMPRESSOR\""
  1303. fi
  1304.  
  1305. {
  1306. test -n "$verbose" && \
  1307. echo "    defining" UNCOMPRESSOR to be "\"$UNCOMPRESSOR\""
  1308. echo "#define" UNCOMPRESSOR "\"$UNCOMPRESSOR\"" >> confdefs.h
  1309. DEFS="$DEFS -DUNCOMPRESSOR=\"$UNCOMPRESSOR\""
  1310. ac_sed_defs="${ac_sed_defs}\${ac_dA}UNCOMPRESSOR\${ac_dB}UNCOMPRESSOR\${ac_dC}\"$UNCOMPRESSOR\"\${ac_dD}
  1311. \${ac_uA}UNCOMPRESSOR\${ac_uB}UNCOMPRESSOR\${ac_uC}\"$UNCOMPRESSOR\"\${ac_uD}
  1312. \${ac_eA}UNCOMPRESSOR\${ac_eB}UNCOMPRESSOR\${ac_eC}\"$UNCOMPRESSOR\"\${ac_eD}
  1313. "
  1314. }
  1315.  
  1316. if test -z "$UNZIPPER"; then
  1317.   # Extract the first word of `gzcat', so it can be a program name with args.
  1318.   set ac_dummy gzcat; ac_word=$2
  1319.   test -n "$silent" || echo "checking for $ac_word"
  1320.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1321.   for ac_dir in $PATH; do
  1322.     test -z "$ac_dir" && ac_dir=.
  1323.     if test -f $ac_dir/$ac_word; then
  1324.       UNZIPPER="$ac_dir/$ac_word"
  1325.       break
  1326.     fi
  1327.   done
  1328.   IFS="$ac_save_ifs"
  1329. fi
  1330. test -z "$UNZIPPER" && UNZIPPER=""gzcat""
  1331. test -n "$UNZIPPER" && test -n "$verbose" && echo "    setting UNZIPPER to $UNZIPPER"
  1332.  
  1333. if test "$UNZIPPER" = "gzcat" ; then
  1334.     echo "Warning: did not found \"gzcat\" in your path"
  1335. else
  1336.     echo "Found zcat: \"$UNZIPPER\""
  1337. fi
  1338.  
  1339. {
  1340. test -n "$verbose" && \
  1341. echo "    defining" UNZIPPER to be "\"$UNZIPPER\""
  1342. echo "#define" UNZIPPER "\"$UNZIPPER\"" >> confdefs.h
  1343. DEFS="$DEFS -DUNZIPPER=\"$UNZIPPER\""
  1344. ac_sed_defs="${ac_sed_defs}\${ac_dA}UNZIPPER\${ac_dB}UNZIPPER\${ac_dC}\"$UNZIPPER\"\${ac_dD}
  1345. \${ac_uA}UNZIPPER\${ac_uB}UNZIPPER\${ac_uC}\"$UNZIPPER\"\${ac_uD}
  1346. \${ac_eA}UNZIPPER\${ac_eB}UNZIPPER\${ac_eC}\"$UNZIPPER\"\${ac_eD}
  1347. "
  1348. }
  1349.  
  1350. test -n "$silent" || echo "checking for ANSI C header files"
  1351. cat > conftest.${ac_ext} <<EOF
  1352. #include "confdefs.h"
  1353. #include <stdlib.h>
  1354. #include <stdarg.h>
  1355. #include <string.h>
  1356. #include <float.h>
  1357. EOF
  1358. # Some shells (Coherent) do redirections in the wrong order, so need
  1359. # the parens.
  1360. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1361. if test -z "$ac_err"; then
  1362.   rm -rf conftest*
  1363.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1364. echo '#include "confdefs.h"
  1365. #include <string.h>' > conftest.${ac_ext}
  1366. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1367. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  1368.   rm -rf conftest*
  1369.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1370. cat > conftest.${ac_ext} <<EOF
  1371. #include "confdefs.h"
  1372. #include <ctype.h>
  1373. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1374. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1375. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  1376. int main () { int i; for (i = 0; i < 256; i++)
  1377. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1378. exit (0); }
  1379.  
  1380. EOF
  1381. eval $ac_compile
  1382. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1383.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1384. echo '#include "confdefs.h"
  1385. #include <stdlib.h>' > conftest.${ac_ext}
  1386. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1387. if egrep "free" conftest.out >/dev/null 2>&1; then
  1388.   rm -rf conftest*
  1389.   
  1390. {
  1391. test -n "$verbose" && \
  1392. echo "    defining STDC_HEADERS"
  1393. echo "#define" STDC_HEADERS "1" >> confdefs.h
  1394. DEFS="$DEFS -DSTDC_HEADERS=1"
  1395. ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
  1396. \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
  1397. \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
  1398. "
  1399. }
  1400.  
  1401.  
  1402. fi
  1403. rm -f conftest*
  1404.  
  1405.  
  1406. fi
  1407. rm -fr conftest*
  1408.  
  1409. fi
  1410. rm -f conftest*
  1411.  
  1412.  
  1413. fi
  1414. rm -f conftest*
  1415.  
  1416. for ac_hdr in memory.h unistd.h string.h sys/fcntl.h sys/select.h sys/shm.h netinet/in.h sys/socket.h netdb.h
  1417. do
  1418. ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  1419. test -n "$silent" || echo "checking for ${ac_hdr}"
  1420. cat > conftest.${ac_ext} <<EOF
  1421. #include "confdefs.h"
  1422. #include <${ac_hdr}>
  1423. EOF
  1424. # Some shells (Coherent) do redirections in the wrong order, so need
  1425. # the parens.
  1426. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1427. if test -z "$ac_err"; then
  1428.   rm -rf conftest*
  1429.   
  1430. {
  1431. test -n "$verbose" && \
  1432. echo "    defining ${ac_tr_hdr}"
  1433. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  1434. DEFS="$DEFS -D${ac_tr_hdr}=1"
  1435. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  1436. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  1437. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  1438. "
  1439. }
  1440.  
  1441.  
  1442. fi
  1443. rm -f conftest*
  1444. done
  1445.  
  1446. echo '#include "confdefs.h"
  1447. #include <regexp.h>' > conftest.${ac_ext}
  1448. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1449. if egrep "getrnge" conftest.out >/dev/null 2>&1; then
  1450.   rm -rf conftest*
  1451.   
  1452. {
  1453. test -n "$verbose" && \
  1454. echo "    defining HAVE_GETRNGE"
  1455. echo "#define" HAVE_GETRNGE "1" >> confdefs.h
  1456. DEFS="$DEFS -DHAVE_GETRNGE=1"
  1457. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_GETRNGE\${ac_dB}HAVE_GETRNGE\${ac_dC}1\${ac_dD}
  1458. \${ac_uA}HAVE_GETRNGE\${ac_uB}HAVE_GETRNGE\${ac_uC}1\${ac_uD}
  1459. \${ac_eA}HAVE_GETRNGE\${ac_eB}HAVE_GETRNGE\${ac_eC}1\${ac_eD}
  1460. "
  1461. }
  1462.  
  1463.  
  1464. fi
  1465. rm -f conftest*
  1466.  
  1467. test -n "$silent" || echo "checking for -lsocket needed"
  1468. cat > conftest.${ac_ext} <<EOF
  1469. #include "confdefs.h"
  1470.  
  1471. int main() { return 0; }
  1472. int t() { socket();
  1473. ; return 0; }
  1474. EOF
  1475. if eval $ac_compile; then
  1476.   rm -rf conftest*
  1477.   echo "Your linker seems to be happy without -lsocket"
  1478.  
  1479. else
  1480.   rm -rf conftest*
  1481.   ac_save_LIBS="${LIBS}"
  1482. LIBS="${LIBS} -lsocket"
  1483. ac_have_lib=""
  1484. test -n "$silent" || echo "checking for -lsocket"
  1485. cat > conftest.${ac_ext} <<EOF
  1486. #include "confdefs.h"
  1487.  
  1488. int main() { return 0; }
  1489. int t() { main();; return 0; }
  1490. EOF
  1491. if eval $ac_compile; then
  1492.   rm -rf conftest*
  1493.   ac_have_lib="1"
  1494.  
  1495. fi
  1496. rm -f conftest*
  1497. LIBS="${ac_save_LIBS}"
  1498. if test -n "${ac_have_lib}"; then
  1499.    :; LIBS="$LIBS -lsocket"
  1500. else
  1501.    :; 
  1502. fi
  1503.  
  1504. fi
  1505. rm -f conftest*
  1506.  
  1507. test -n "$silent" || echo "checking for -lnsl needed"
  1508. cat > conftest.${ac_ext} <<EOF
  1509. #include "confdefs.h"
  1510.  
  1511. int main() { return 0; }
  1512. int t() { gethostbyname();
  1513. ; return 0; }
  1514. EOF
  1515. if eval $ac_compile; then
  1516.   rm -rf conftest*
  1517.   echo "Your linker seems to be happy without -lnsl" ; 
  1518.  
  1519. else
  1520.   rm -rf conftest*
  1521.   ac_save_LIBS="${LIBS}"
  1522. LIBS="${LIBS} -lnsl"
  1523. ac_have_lib=""
  1524. test -n "$silent" || echo "checking for -lnsl"
  1525. cat > conftest.${ac_ext} <<EOF
  1526. #include "confdefs.h"
  1527.  
  1528. int main() { return 0; }
  1529. int t() { main();; return 0; }
  1530. EOF
  1531. if eval $ac_compile; then
  1532.   rm -rf conftest*
  1533.   ac_have_lib="1"
  1534.  
  1535. fi
  1536. rm -f conftest*
  1537. LIBS="${ac_save_LIBS}"
  1538. if test -n "${ac_have_lib}"; then
  1539.    :; LIBS="$LIBS -lnsl"
  1540. else
  1541.    :; 
  1542. fi
  1543.  
  1544. fi
  1545. rm -f conftest*
  1546.  
  1547. test -n "$silent" || echo "checking for -lmalloc needed"
  1548. cat > conftest.${ac_ext} <<EOF
  1549. #include "confdefs.h"
  1550.  
  1551. int main() { return 0; }
  1552. int t() { malloc();
  1553. ; return 0; }
  1554. EOF
  1555. if eval $ac_compile; then
  1556.   rm -rf conftest*
  1557.   echo "Your linker seems to be happy without -lmalloc" ; 
  1558.  
  1559. else
  1560.   rm -rf conftest*
  1561.   ac_save_LIBS="${LIBS}"
  1562. LIBS="${LIBS} -lmalloc"
  1563. ac_have_lib=""
  1564. test -n "$silent" || echo "checking for -lmalloc"
  1565. cat > conftest.${ac_ext} <<EOF
  1566. #include "confdefs.h"
  1567.  
  1568. int main() { return 0; }
  1569. int t() { main();; return 0; }
  1570. EOF
  1571. if eval $ac_compile; then
  1572.   rm -rf conftest*
  1573.   ac_have_lib="1"
  1574.  
  1575. fi
  1576. rm -f conftest*
  1577. LIBS="${ac_save_LIBS}"
  1578. if test -n "${ac_have_lib}"; then
  1579.    :; LIBS="$LIBS -lmalloc"
  1580. else
  1581.    :; 
  1582. fi
  1583.  
  1584. fi
  1585. rm -f conftest*
  1586.  
  1587. ac_save_LIBS="${LIBS}"
  1588. LIBS="${LIBS} -lcs"
  1589. ac_have_lib=""
  1590. test -n "$silent" || echo "checking for -lcs"
  1591. cat > conftest.${ac_ext} <<EOF
  1592. #include "confdefs.h"
  1593.  
  1594. int main() { return 0; }
  1595. int t() { main();; return 0; }
  1596. EOF
  1597. if eval $ac_compile; then
  1598.   rm -rf conftest*
  1599.   ac_have_lib="1"
  1600.  
  1601. fi
  1602. rm -f conftest*
  1603. LIBS="${ac_save_LIBS}"
  1604. if test -n "${ac_have_lib}"; then
  1605.    :; LIBS="$LIBS -lcs"
  1606. else
  1607.    :; 
  1608. fi
  1609.  
  1610. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1611. # for constant arguments.  Useless!
  1612. test -n "$silent" || echo "checking for working alloca.h"
  1613. cat > conftest.${ac_ext} <<EOF
  1614. #include "confdefs.h"
  1615. #include <alloca.h>
  1616. int main() { return 0; }
  1617. int t() { char *p = alloca(2 * sizeof(int));; return 0; }
  1618. EOF
  1619. if eval $ac_compile; then
  1620.   rm -rf conftest*
  1621.   
  1622. {
  1623. test -n "$verbose" && \
  1624. echo "    defining HAVE_ALLOCA_H"
  1625. echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
  1626. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  1627. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
  1628. \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
  1629. \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
  1630. "
  1631. }
  1632.  
  1633.  
  1634. fi
  1635. rm -f conftest*
  1636.  
  1637. ac_decl="#ifdef __GNUC__
  1638. #define alloca __builtin_alloca
  1639. #else
  1640. #if HAVE_ALLOCA_H
  1641. #include <alloca.h>
  1642. #else
  1643. #ifdef _AIX
  1644.  #pragma alloca
  1645. #else
  1646. char *alloca ();
  1647. #endif
  1648. #endif
  1649. #endif
  1650. "
  1651. test -n "$silent" || echo "checking for alloca"
  1652. cat > conftest.${ac_ext} <<EOF
  1653. #include "confdefs.h"
  1654. $ac_decl
  1655. int main() { return 0; }
  1656. int t() { char *p = (char *) alloca(1);; return 0; }
  1657. EOF
  1658. if eval $ac_compile; then
  1659.   rm -rf conftest*
  1660.   
  1661. {
  1662. test -n "$verbose" && \
  1663. echo "    defining HAVE_ALLOCA"
  1664. echo "#define" HAVE_ALLOCA "1" >> confdefs.h
  1665. DEFS="$DEFS -DHAVE_ALLOCA=1"
  1666. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
  1667. \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
  1668. \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
  1669. "
  1670. }
  1671.  
  1672.  
  1673. else
  1674.   rm -rf conftest*
  1675.   ac_alloca_missing=1
  1676. cat > conftest.${ac_ext} <<EOF
  1677. #include "confdefs.h"
  1678.  
  1679. #if defined(CRAY) && ! defined(CRAY2)
  1680. winnitude
  1681. #else
  1682. lossage
  1683. #endif
  1684.  
  1685. EOF
  1686. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1687. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  1688.   rm -rf conftest*
  1689.   test -n "$silent" || echo "checking for _getb67"
  1690. cat > conftest.${ac_ext} <<EOF
  1691. #include "confdefs.h"
  1692. #include <ctype.h>
  1693. int main() { return 0; }
  1694. int t() { 
  1695. /* The GNU C library defines this for functions which it implements
  1696.     to always fail with ENOSYS.  Some functions are actually named
  1697.     something starting with __ and the normal name is an alias.  */
  1698. #if defined (__stub__getb67) || defined (__stub____getb67)
  1699. choke me
  1700. #else
  1701. /* Override any gcc2 internal prototype to avoid an error.  */
  1702. extern char _getb67(); _getb67();
  1703. #endif
  1704. ; return 0; }
  1705. EOF
  1706. if eval $ac_compile; then
  1707.   rm -rf conftest*
  1708.   {
  1709. test -n "$verbose" && \
  1710. echo "    defining" CRAY_STACKSEG_END to be "_getb67"
  1711. echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
  1712. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  1713. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
  1714. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
  1715. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
  1716. "
  1717. }
  1718.  
  1719.  
  1720. else
  1721.   rm -rf conftest*
  1722.   test -n "$silent" || echo "checking for GETB67"
  1723. cat > conftest.${ac_ext} <<EOF
  1724. #include "confdefs.h"
  1725. #include <ctype.h>
  1726. int main() { return 0; }
  1727. int t() { 
  1728. /* The GNU C library defines this for functions which it implements
  1729.     to always fail with ENOSYS.  Some functions are actually named
  1730.     something starting with __ and the normal name is an alias.  */
  1731. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  1732. choke me
  1733. #else
  1734. /* Override any gcc2 internal prototype to avoid an error.  */
  1735. extern char GETB67(); GETB67();
  1736. #endif
  1737. ; return 0; }
  1738. EOF
  1739. if eval $ac_compile; then
  1740.   rm -rf conftest*
  1741.   {
  1742. test -n "$verbose" && \
  1743. echo "    defining" CRAY_STACKSEG_END to be "GETB67"
  1744. echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
  1745. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  1746. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
  1747. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
  1748. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
  1749. "
  1750. }
  1751.  
  1752.  
  1753. else
  1754.   rm -rf conftest*
  1755.   test -n "$silent" || echo "checking for getb67"
  1756. cat > conftest.${ac_ext} <<EOF
  1757. #include "confdefs.h"
  1758. #include <ctype.h>
  1759. int main() { return 0; }
  1760. int t() { 
  1761. /* The GNU C library defines this for functions which it implements
  1762.     to always fail with ENOSYS.  Some functions are actually named
  1763.     something starting with __ and the normal name is an alias.  */
  1764. #if defined (__stub_getb67) || defined (__stub___getb67)
  1765. choke me
  1766. #else
  1767. /* Override any gcc2 internal prototype to avoid an error.  */
  1768. extern char getb67(); getb67();
  1769. #endif
  1770. ; return 0; }
  1771. EOF
  1772. if eval $ac_compile; then
  1773.   rm -rf conftest*
  1774.   {
  1775. test -n "$verbose" && \
  1776. echo "    defining" CRAY_STACKSEG_END to be "getb67"
  1777. echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
  1778. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  1779. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
  1780. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
  1781. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
  1782. "
  1783. }
  1784.  
  1785.  
  1786. fi
  1787. rm -f conftest*
  1788.  
  1789. fi
  1790. rm -f conftest*
  1791.  
  1792. fi
  1793. rm -f conftest*
  1794.  
  1795.  
  1796. fi
  1797. rm -f conftest*
  1798.  
  1799.  
  1800. fi
  1801. rm -f conftest*
  1802.  
  1803. if test -n "$ac_alloca_missing"; then
  1804.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1805.   # that cause trouble.  Some versions do not even contain alloca or
  1806.   # contain a buggy version.  If you still want to use their alloca,
  1807.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1808.   ALLOCA=alloca.o
  1809.   
  1810. {
  1811. test -n "$verbose" && \
  1812. echo "    defining C_ALLOCA"
  1813. echo "#define" C_ALLOCA "1" >> confdefs.h
  1814. DEFS="$DEFS -DC_ALLOCA=1"
  1815. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
  1816. \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
  1817. \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
  1818. "
  1819. }
  1820.  
  1821.  
  1822.   test -n "$silent" || echo "checking stack direction for C alloca"
  1823.   test -n "$silent" || echo "checking whether cross-compiling"
  1824. # If we cannot run a trivial program, we must be cross compiling.
  1825. cat > conftest.${ac_ext} <<EOF
  1826. #include "confdefs.h"
  1827. main(){exit(0);}
  1828. EOF
  1829. eval $ac_compile
  1830. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1831.   :
  1832. else
  1833.   cross_compiling=1
  1834. fi
  1835. rm -fr conftest*
  1836.  
  1837. if test -n "$cross_compiling"
  1838. then
  1839.   
  1840. {
  1841. test -n "$verbose" && \
  1842. echo "    defining" STACK_DIRECTION to be "0"
  1843. echo "#define" STACK_DIRECTION "0" >> confdefs.h
  1844. DEFS="$DEFS -DSTACK_DIRECTION=0"
  1845. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
  1846. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
  1847. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
  1848. "
  1849. }
  1850.  
  1851. else
  1852. cat > conftest.${ac_ext} <<EOF
  1853. #include "confdefs.h"
  1854. find_stack_direction ()
  1855. {
  1856.   static char *addr = 0;
  1857.   auto char dummy;
  1858.   if (addr == 0)
  1859.     {
  1860.       addr = &dummy;
  1861.       return find_stack_direction ();
  1862.     }
  1863.   else
  1864.     return (&dummy > addr) ? 1 : -1;
  1865. }
  1866. main ()
  1867. {
  1868.   exit (find_stack_direction() < 0);
  1869. }
  1870. EOF
  1871. eval $ac_compile
  1872. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1873.   
  1874. {
  1875. test -n "$verbose" && \
  1876. echo "    defining" STACK_DIRECTION to be "1"
  1877. echo "#define" STACK_DIRECTION "1" >> confdefs.h
  1878. DEFS="$DEFS -DSTACK_DIRECTION=1"
  1879. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
  1880. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
  1881. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
  1882. "
  1883. }
  1884.  
  1885.  
  1886. else
  1887.   
  1888. {
  1889. test -n "$verbose" && \
  1890. echo "    defining" STACK_DIRECTION to be "-1"
  1891. echo "#define" STACK_DIRECTION "-1" >> confdefs.h
  1892. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  1893. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
  1894. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
  1895. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
  1896. "
  1897. }
  1898.  
  1899. fi
  1900. fi
  1901. rm -fr conftest*
  1902. fi
  1903.  
  1904. echo '#include "confdefs.h"
  1905. #include <dirent.h>' > conftest.${ac_ext}
  1906. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1907. if egrep "alphasort" conftest.out >/dev/null 2>&1; then
  1908.   rm -rf conftest*
  1909.   
  1910. {
  1911. test -n "$verbose" && \
  1912. echo "    defining HAVE_ALPHASORT"
  1913. echo "#define" HAVE_ALPHASORT "1" >> confdefs.h
  1914. DEFS="$DEFS -DHAVE_ALPHASORT=1"
  1915. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALPHASORT\${ac_dB}HAVE_ALPHASORT\${ac_dC}1\${ac_dD}
  1916. \${ac_uA}HAVE_ALPHASORT\${ac_uB}HAVE_ALPHASORT\${ac_uC}1\${ac_uD}
  1917. \${ac_eA}HAVE_ALPHASORT\${ac_eB}HAVE_ALPHASORT\${ac_eC}1\${ac_eD}
  1918. "
  1919. }
  1920.  
  1921.  
  1922. fi
  1923. rm -f conftest*
  1924.  
  1925. echo '#include "confdefs.h"
  1926. #include <dirent.h>' > conftest.${ac_ext}
  1927. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1928. if egrep "scandir" conftest.out >/dev/null 2>&1; then
  1929.   rm -rf conftest*
  1930.   
  1931. {
  1932. test -n "$verbose" && \
  1933. echo "    defining HAVE_SCANDIR"
  1934. echo "#define" HAVE_SCANDIR "1" >> confdefs.h
  1935. DEFS="$DEFS -DHAVE_SCANDIR=1"
  1936. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SCANDIR\${ac_dB}HAVE_SCANDIR\${ac_dC}1\${ac_dD}
  1937. \${ac_uA}HAVE_SCANDIR\${ac_uB}HAVE_SCANDIR\${ac_uC}1\${ac_uD}
  1938. \${ac_eA}HAVE_SCANDIR\${ac_eB}HAVE_SCANDIR\${ac_eC}1\${ac_eD}
  1939. "
  1940. }
  1941.  
  1942.  
  1943. fi
  1944. rm -f conftest*
  1945.  
  1946. echo '#include "confdefs.h"
  1947. #include <stdio.h>' > conftest.${ac_ext}
  1948. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1949. if egrep "remove" conftest.out >/dev/null 2>&1; then
  1950.   rm -rf conftest*
  1951.   
  1952. {
  1953. test -n "$verbose" && \
  1954. echo "    defining HAVE_REMOVE"
  1955. echo "#define" HAVE_REMOVE "1" >> confdefs.h
  1956. DEFS="$DEFS -DHAVE_REMOVE=1"
  1957. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_REMOVE\${ac_dB}HAVE_REMOVE\${ac_dC}1\${ac_dD}
  1958. \${ac_uA}HAVE_REMOVE\${ac_uB}HAVE_REMOVE\${ac_uC}1\${ac_uD}
  1959. \${ac_eA}HAVE_REMOVE\${ac_eB}HAVE_REMOVE\${ac_eC}1\${ac_eD}
  1960. "
  1961. }
  1962.  
  1963.  
  1964. fi
  1965. rm -f conftest*
  1966.  
  1967. echo '#include "confdefs.h"
  1968. #include <unistd.h>' > conftest.${ac_ext}
  1969. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1970. if egrep "getcwd" conftest.out >/dev/null 2>&1; then
  1971.   rm -rf conftest*
  1972.   
  1973. {
  1974. test -n "$verbose" && \
  1975. echo "    defining HAVE_GETCWD"
  1976. echo "#define" HAVE_GETCWD "1" >> confdefs.h
  1977. DEFS="$DEFS -DHAVE_GETCWD=1"
  1978. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_GETCWD\${ac_dB}HAVE_GETCWD\${ac_dC}1\${ac_dD}
  1979. \${ac_uA}HAVE_GETCWD\${ac_uB}HAVE_GETCWD\${ac_uC}1\${ac_uD}
  1980. \${ac_eA}HAVE_GETCWD\${ac_eB}HAVE_GETCWD\${ac_eC}1\${ac_eD}
  1981. "
  1982. }
  1983.  
  1984.  
  1985. fi
  1986. rm -f conftest*
  1987.  
  1988. echo '#include "confdefs.h"
  1989. #include <unistd.h>' > conftest.${ac_ext}
  1990. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1991. if egrep "getwd" conftest.out >/dev/null 2>&1; then
  1992.   rm -rf conftest*
  1993.   
  1994. {
  1995. test -n "$verbose" && \
  1996. echo "    defining HAVE_GETWD"
  1997. echo "#define" HAVE_GETWD "1" >> confdefs.h
  1998. DEFS="$DEFS -DHAVE_GETWD=1"
  1999. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_GETWD\${ac_dB}HAVE_GETWD\${ac_dC}1\${ac_dD}
  2000. \${ac_uA}HAVE_GETWD\${ac_uB}HAVE_GETWD\${ac_uC}1\${ac_uD}
  2001. \${ac_eA}HAVE_GETWD\${ac_eB}HAVE_GETWD\${ac_eC}1\${ac_eD}
  2002. "
  2003. }
  2004.  
  2005.  
  2006. fi
  2007. rm -f conftest*
  2008.  
  2009. for ac_func in memcpy bcopy memmove strdup
  2010. do
  2011. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2012. test -n "$silent" || echo "checking for ${ac_func}"
  2013. cat > conftest.${ac_ext} <<EOF
  2014. #include "confdefs.h"
  2015. #include <ctype.h>
  2016. int main() { return 0; }
  2017. int t() { 
  2018. /* The GNU C library defines this for functions which it implements
  2019.     to always fail with ENOSYS.  Some functions are actually named
  2020.     something starting with __ and the normal name is an alias.  */
  2021. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  2022. choke me
  2023. #else
  2024. /* Override any gcc2 internal prototype to avoid an error.  */
  2025. extern char ${ac_func}(); ${ac_func}();
  2026. #endif
  2027. ; return 0; }
  2028. EOF
  2029. if eval $ac_compile; then
  2030.   rm -rf conftest*
  2031.   {
  2032. test -n "$verbose" && \
  2033. echo "    defining ${ac_tr_func}"
  2034. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  2035. DEFS="$DEFS -D${ac_tr_func}=1"
  2036. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  2037. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  2038. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  2039. "
  2040. }
  2041.  
  2042.  
  2043. fi
  2044. rm -f conftest*
  2045. done
  2046.  
  2047. case "$DEFS" in
  2048.     *HAVE_MEMCPY* )
  2049. echo "Checking to see if your memcpy() can do overlapping copies..." 
  2050. cat > conftest.${ac_ext} <<EOF
  2051. #include "confdefs.h"
  2052.  
  2053. main()
  2054. {
  2055. char buf[128], abc[128];
  2056. char *b;
  2057. int len;
  2058. int off;
  2059. int align;
  2060.  
  2061. memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
  2062.  
  2063. for (align = 7; align >= 0; align--) {
  2064.     for (len = 36; len; len--) {
  2065.         b = buf+align;
  2066.         memcpy(abc, b, len);
  2067.         for (off = 1; off <= len; off++) {
  2068.             memcpy(b, b+off, len);
  2069.             memcpy(b+off, b, len);
  2070.             if (memcmp(b, abc, len))
  2071.                 exit(1);
  2072.         }
  2073.     }
  2074. }
  2075. exit(0);
  2076. }
  2077.  
  2078.  
  2079. EOF
  2080. eval $ac_compile
  2081. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2082.   echo "Yes, it can." ; 
  2083. {
  2084. test -n "$verbose" && \
  2085. echo "    defining MEMCPY_OVERLAP"
  2086. echo "#define" MEMCPY_OVERLAP "1" >> confdefs.h
  2087. DEFS="$DEFS -DMEMCPY_OVERLAP=1"
  2088. ac_sed_defs="${ac_sed_defs}\${ac_dA}MEMCPY_OVERLAP\${ac_dB}MEMCPY_OVERLAP\${ac_dC}1\${ac_dD}
  2089. \${ac_uA}MEMCPY_OVERLAP\${ac_uB}MEMCPY_OVERLAP\${ac_uC}1\${ac_uD}
  2090. \${ac_eA}MEMCPY_OVERLAP\${ac_eB}MEMCPY_OVERLAP\${ac_eC}1\${ac_eD}
  2091. "
  2092. }
  2093.  
  2094.  
  2095. else
  2096.   echo "It can't, sorry."
  2097. fi
  2098. rm -fr conftest* 
  2099. ;;
  2100. esac
  2101.  
  2102. case "$DEFS" in
  2103. *HAVE_BCOPY*)
  2104. echo "Checking to see if your bcopy() can do overlapping copies..." 
  2105. cat > conftest.${ac_ext} <<EOF
  2106. #include "confdefs.h"
  2107.  
  2108. main()
  2109. {
  2110. char buf[128], abc[128];
  2111. char *b;
  2112. int len;
  2113. int off;
  2114. int align;
  2115. bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
  2116.  
  2117. for (align = 7; align >= 0; align--) {
  2118.     for (len = 36; len; len--) {
  2119.         b = buf+align;
  2120.         bcopy(abc, b, len);
  2121.         for (off = 1; off <= len; off++) {
  2122.             bcopy(b, b+off, len);
  2123.             bcopy(b+off, b, len);
  2124.             if (bcmp(b, abc, len))
  2125.                 exit(1);
  2126.         }
  2127.     }
  2128. }
  2129. exit(0);
  2130. }
  2131.  
  2132. EOF
  2133. eval $ac_compile
  2134. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2135.   echo "Yes, it can." ; 
  2136. {
  2137. test -n "$verbose" && \
  2138. echo "    defining BCOPY_OVERLAP"
  2139. echo "#define" BCOPY_OVERLAP "1" >> confdefs.h
  2140. DEFS="$DEFS -DBCOPY_OVERLAP=1"
  2141. ac_sed_defs="${ac_sed_defs}\${ac_dA}BCOPY_OVERLAP\${ac_dB}BCOPY_OVERLAP\${ac_dC}1\${ac_dD}
  2142. \${ac_uA}BCOPY_OVERLAP\${ac_uB}BCOPY_OVERLAP\${ac_uC}1\${ac_uD}
  2143. \${ac_eA}BCOPY_OVERLAP\${ac_eB}BCOPY_OVERLAP\${ac_eC}1\${ac_eD}
  2144. "
  2145. }
  2146.  
  2147.  
  2148. else
  2149.   echo "It can't, sorry."
  2150. fi
  2151. rm -fr conftest*
  2152. ;;    
  2153. esac
  2154.  
  2155. test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
  2156. cat > conftest.${ac_ext} <<EOF
  2157. #include "confdefs.h"
  2158. #include <sys/types.h>
  2159. #include <sys/time.h>
  2160. #include <time.h>
  2161. int main() { return 0; }
  2162. int t() { struct tm *tp;; return 0; }
  2163. EOF
  2164. if eval $ac_compile; then
  2165.   rm -rf conftest*
  2166.   
  2167. {
  2168. test -n "$verbose" && \
  2169. echo "    defining TIME_WITH_SYS_TIME"
  2170. echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
  2171. DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
  2172. ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
  2173. \${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
  2174. \${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
  2175. "
  2176. }
  2177.  
  2178.  
  2179. fi
  2180. rm -f conftest*
  2181.  
  2182. test -n "$silent" || echo "checking for struct tm in time.h"
  2183. cat > conftest.${ac_ext} <<EOF
  2184. #include "confdefs.h"
  2185. #include <sys/types.h>
  2186. #include <time.h>
  2187. int main() { return 0; }
  2188. int t() { struct tm *tp; tp->tm_sec;; return 0; }
  2189. EOF
  2190. if eval $ac_compile; then
  2191.   :
  2192. else
  2193.   rm -rf conftest*
  2194.   
  2195. {
  2196. test -n "$verbose" && \
  2197. echo "    defining TM_IN_SYS_TIME"
  2198. echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
  2199. DEFS="$DEFS -DTM_IN_SYS_TIME=1"
  2200. ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
  2201. \${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
  2202. \${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
  2203. "
  2204. }
  2205.  
  2206. fi
  2207. rm -f conftest*
  2208.  
  2209. test -n "$silent" || echo "checking for unsigned characters"
  2210. cat > conftest.${ac_ext} <<EOF
  2211. #include "confdefs.h"
  2212. /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  2213. #if !__STDC__
  2214. #define volatile
  2215. #endif
  2216. main() {
  2217. #ifdef __CHAR_UNSIGNED__
  2218.   exit(1); /* No need to redefine it.  */
  2219. #else
  2220.   volatile char c = 255; exit(c < 0);
  2221. #endif
  2222. }
  2223. EOF
  2224. eval $ac_compile
  2225. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2226.   
  2227. {
  2228. test -n "$verbose" && \
  2229. echo "    defining __CHAR_UNSIGNED__"
  2230. echo "#define" __CHAR_UNSIGNED__ "1" >> confdefs.h
  2231. DEFS="$DEFS -D__CHAR_UNSIGNED__=1"
  2232. ac_sed_defs="${ac_sed_defs}\${ac_dA}__CHAR_UNSIGNED__\${ac_dB}__CHAR_UNSIGNED__\${ac_dC}1\${ac_dD}
  2233. \${ac_uA}__CHAR_UNSIGNED__\${ac_uB}__CHAR_UNSIGNED__\${ac_uC}1\${ac_uD}
  2234. \${ac_eA}__CHAR_UNSIGNED__\${ac_eB}__CHAR_UNSIGNED__\${ac_eC}1\${ac_eD}
  2235. "
  2236. }
  2237.  
  2238.  
  2239. fi
  2240. rm -fr conftest*
  2241.  
  2242. ac_prog='/* Ultrix mips cc rejects this.  */
  2243. typedef int charset[2]; const charset x;
  2244. /* SunOS 4.1.1 cc rejects this.  */
  2245. char const *const *ccp;
  2246. char **p;
  2247. /* AIX XL C 1.02.0.0 rejects this.
  2248.    It does not let you subtract one const X* pointer from another in an arm
  2249.    of an if-expression whose if-part is not a constant expression */
  2250. const char *g = "string";
  2251. ccp = &g + (g ? g-g : 0);
  2252. /* HPUX 7.0 cc rejects these. */
  2253. ++ccp;
  2254. p = (char**) ccp;
  2255. ccp = (char const *const *) p;
  2256. { /* SCO 3.2v4 cc rejects this.  */
  2257.   char *t;
  2258.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  2259.  
  2260.   *t++ = 0;
  2261. }
  2262. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  2263.   int x[] = {25,17};
  2264.   const int *foo = &x[0];
  2265.   ++foo;
  2266. }
  2267. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  2268.   typedef const int *iptr;
  2269.   iptr p = 0;
  2270.   ++p;
  2271. }
  2272. { /* AIX XL C 1.02.0.0 rejects this saying
  2273.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  2274.   struct s { int j; const int *ap[3]; };
  2275.   struct s *b; b->j = 5;
  2276. }
  2277. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  2278.   const int foo = 10;
  2279. }'
  2280. test -n "$silent" || echo "checking for lack of working const"
  2281. cat > conftest.${ac_ext} <<EOF
  2282. #include "confdefs.h"
  2283.  
  2284. int main() { return 0; }
  2285. int t() { $ac_prog; return 0; }
  2286. EOF
  2287. if eval $ac_compile; then
  2288.   :
  2289. else
  2290.   rm -rf conftest*
  2291.   
  2292. {
  2293. test -n "$verbose" && \
  2294. echo "    defining" const to be empty
  2295. echo "#define" const "" >> confdefs.h
  2296. DEFS="$DEFS -Dconst="
  2297. ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
  2298. \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
  2299. \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
  2300. "
  2301. }
  2302.  
  2303. fi
  2304. rm -f conftest*
  2305.  
  2306. test -n "$silent" || echo "checking for inet_ntoa with struct argument"
  2307. cat > conftest.${ac_ext} <<EOF
  2308. #include "confdefs.h"
  2309.  
  2310. #include <sys/types.h>
  2311. #include <sys/socket.h>
  2312. #include <netinet/in.h>
  2313. #include <arpa/inet.h>
  2314.  
  2315. int main() { return 0; }
  2316. int t() { 
  2317. struct sockaddr_in source;
  2318. inet_ntoa(source.sin_addr)
  2319. ; return 0; }
  2320. EOF
  2321. if eval $ac_compile; then
  2322.   rm -rf conftest*
  2323.   
  2324. {
  2325. test -n "$verbose" && \
  2326. echo "    defining INET_NTOA_WITH_STRUCT"
  2327. echo "#define" INET_NTOA_WITH_STRUCT "1" >> confdefs.h
  2328. DEFS="$DEFS -DINET_NTOA_WITH_STRUCT=1"
  2329. ac_sed_defs="${ac_sed_defs}\${ac_dA}INET_NTOA_WITH_STRUCT\${ac_dB}INET_NTOA_WITH_STRUCT\${ac_dC}1\${ac_dD}
  2330. \${ac_uA}INET_NTOA_WITH_STRUCT\${ac_uB}INET_NTOA_WITH_STRUCT\${ac_uC}1\${ac_uD}
  2331. \${ac_eA}INET_NTOA_WITH_STRUCT\${ac_eB}INET_NTOA_WITH_STRUCT\${ac_eC}1\${ac_eD}
  2332. "
  2333. }
  2334.  
  2335.  
  2336. fi
  2337. rm -f conftest*
  2338.  
  2339. test -n "$silent" || echo "checking for inet_ntoa with pointer argument"
  2340. cat > conftest.${ac_ext} <<EOF
  2341. #include "confdefs.h"
  2342.  
  2343. #include <sys/types.h>
  2344. #include <sys/socket.h>
  2345. #include <netinet/in.h>
  2346. #include <arpa/inet.h>
  2347.  
  2348. int main() { return 0; }
  2349. int t() { 
  2350. struct sockaddr_in source;
  2351. inet_ntoa(&source.sin_addr)
  2352. ; return 0; }
  2353. EOF
  2354. if eval $ac_compile; then
  2355.   rm -rf conftest*
  2356.   
  2357. {
  2358. test -n "$verbose" && \
  2359. echo "    defining INET_NTOA_WITH_POINTER"
  2360. echo "#define" INET_NTOA_WITH_POINTER "1" >> confdefs.h
  2361. DEFS="$DEFS -DINET_NTOA_WITH_POINTER=1"
  2362. ac_sed_defs="${ac_sed_defs}\${ac_dA}INET_NTOA_WITH_POINTER\${ac_dB}INET_NTOA_WITH_POINTER\${ac_dC}1\${ac_dD}
  2363. \${ac_uA}INET_NTOA_WITH_POINTER\${ac_uB}INET_NTOA_WITH_POINTER\${ac_uC}1\${ac_uD}
  2364. \${ac_eA}INET_NTOA_WITH_POINTER\${ac_eB}INET_NTOA_WITH_POINTER\${ac_eC}1\${ac_eD}
  2365. "
  2366. }
  2367.  
  2368.  
  2369. fi
  2370. rm -f conftest*
  2371.  
  2372.  
  2373. echo checking for ctype.h
  2374. cat > conftest.${ac_ext} <<EOF
  2375. #include "confdefs.h"
  2376.  
  2377. #include <ctype.h>
  2378. #ifndef HAVE_BCOPY
  2379. #define bcopy(s, d, n) memcpy ((d), (s), (n))
  2380. #endif
  2381. unsigned char ctype[256];
  2382. main()
  2383. {
  2384.      bcopy(_ctype_,ctype,256*sizeof(char));
  2385.      exit(0);
  2386. }
  2387.  
  2388. EOF
  2389. eval $ac_compile
  2390. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2391.   
  2392. {
  2393. test -n "$verbose" && \
  2394. echo "    defining" CTYPEVAR to be "_ctype_"
  2395. echo "#define" CTYPEVAR "_ctype_" >> confdefs.h
  2396. DEFS="$DEFS -DCTYPEVAR=_ctype_"
  2397. ac_sed_defs="${ac_sed_defs}\${ac_dA}CTYPEVAR\${ac_dB}CTYPEVAR\${ac_dC}_ctype_\${ac_dD}
  2398. \${ac_uA}CTYPEVAR\${ac_uB}CTYPEVAR\${ac_uC}_ctype_\${ac_uD}
  2399. \${ac_eA}CTYPEVAR\${ac_eB}CTYPEVAR\${ac_eC}_ctype_\${ac_eD}
  2400. "
  2401. }
  2402.  
  2403.  
  2404. fi
  2405. rm -fr conftest*
  2406. echo checking for regexp.h
  2407. cat > conftest.${ac_ext} <<EOF
  2408. #include "confdefs.h"
  2409.  
  2410. #define INIT register char *regexp=instring;
  2411. #define GETC() (*regexp++)
  2412. #define PEEKC() (*regexp)
  2413. #define UNGETC(c) (regexp--)
  2414. #define RETURN(pointer) return(0);          /* return 0 on sucess */
  2415. #define ERROR(val) return((char *) val);    /* return error code on failure */
  2416. #include <regexp.h>
  2417. main()
  2418. {
  2419.         circf = 1;
  2420.         exit(0);
  2421. }
  2422.  
  2423. EOF
  2424. eval $ac_compile
  2425. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2426.   REGEXP=1
  2427.  
  2428. else
  2429.   REGEXP=0;echo failed
  2430. fi
  2431. rm -fr conftest*
  2432.  
  2433.  
  2434. if test "1" = "$REGEXP" ; then
  2435.     echo "Do you want to use your systems regexp.h (no)?";
  2436. read usereg;
  2437. if test "$usereg" = "" ; then
  2438.         usereg="no";
  2439. fi
  2440.     if test "$usereg" = "no" ; then
  2441.         REGEXP=0;
  2442.     fi      
  2443. fi
  2444. if test "0" = "$REGEXP" ; then
  2445.     {
  2446.     
  2447. {
  2448. test -n "$verbose" && \
  2449. echo "    defining SYSVREGEXP"
  2450. echo "#define" SYSVREGEXP "1" >> confdefs.h
  2451. DEFS="$DEFS -DSYSVREGEXP=1"
  2452. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSVREGEXP\${ac_dB}SYSVREGEXP\${ac_dC}1\${ac_dD}
  2453. \${ac_uA}SYSVREGEXP\${ac_uB}SYSVREGEXP\${ac_uC}1\${ac_uD}
  2454. \${ac_eA}SYSVREGEXP\${ac_eB}SYSVREGEXP\${ac_eC}1\${ac_eD}
  2455. "
  2456. }
  2457.  
  2458.     REGEXPLIB=../regexp/libregexp.a
  2459.     SUBDIRS=regexp
  2460.     echo "Ok, will use my own regxep.h";
  2461.     }
  2462. else 
  2463.     echo "Ok, will stick with your REGXEP";
  2464. fi
  2465.  
  2466. echo "Will you have HEADLINE files greater than 16 MB (no)?";
  2467. read huge_headlines;
  2468. if test "$huge_headlines" = "" ; then
  2469.         huge_headlines="no";
  2470. fi
  2471.  
  2472. if test "$huge_headlines" = "yes" ; then
  2473.         {
  2474.         
  2475. {
  2476. test -n "$verbose" && \
  2477. echo "    defining HUGE_HEADLINES"
  2478. echo "#define" HUGE_HEADLINES "1" >> confdefs.h
  2479. DEFS="$DEFS -DHUGE_HEADLINES=1"
  2480. ac_sed_defs="${ac_sed_defs}\${ac_dA}HUGE_HEADLINES\${ac_dB}HUGE_HEADLINES\${ac_dC}1\${ac_dD}
  2481. \${ac_uA}HUGE_HEADLINES\${ac_uB}HUGE_HEADLINES\${ac_uC}1\${ac_uD}
  2482. \${ac_eA}HUGE_HEADLINES\${ac_eB}HUGE_HEADLINES\${ac_eC}1\${ac_eD}
  2483. "
  2484. }
  2485.         echo "Note that old indexes are invalid for the new server" ;
  2486.         }
  2487. else 
  2488.         echo "Ok, no huge headlines; old indexes remain valid" ;
  2489. fi
  2490.  
  2491.  
  2492. echo ""
  2493. echo You can compile freeWAIS-sf with it\'s own ctype package. You
  2494. echo should do this, if you want to use special "(country specific)"
  2495. echo chars, which are not supported by your systems ctype.
  2496.  
  2497. echo "Use your systems ctype (no)?";
  2498. read iso;
  2499. if test "$iso" = "" ; then
  2500.         iso="no";
  2501. fi
  2502. if test "$iso" = "no" ; then
  2503.     echo "Ok, will use my own ctype";
  2504.     INC="${INC} -I../ctype"
  2505.     SUBDIRS="ctype ${SUBDIRS}"
  2506.     LFLAGS="${LFLAGS} -8"
  2507.     ISOOBJS=../ctype/ctype.o
  2508.     
  2509. {
  2510. test -n "$verbose" && \
  2511. echo "    defining ISO"
  2512. echo "#define" ISO "1" >> confdefs.h
  2513. DEFS="$DEFS -DISO=1"
  2514. ac_sed_defs="${ac_sed_defs}\${ac_dA}ISO\${ac_dB}ISO\${ac_dC}1\${ac_dD}
  2515. \${ac_uA}ISO\${ac_uB}ISO\${ac_uC}1\${ac_uD}
  2516. \${ac_eA}ISO\${ac_eB}ISO\${ac_eC}1\${ac_eD}
  2517. "
  2518. }
  2519.  
  2520.     echo ""
  2521.     echo I will now ask for your special letters.  If you do not want
  2522.     echo to give the now, edit Default.tmpl after this configure run.
  2523.     echo Input your upper case letters in the same order than your
  2524.     echo lower case letters. "toupper() and tolower()" depend on this
  2525.     echo order. Input letters wich are upper and lower case in both
  2526.     echo strings.
  2527.  
  2528.     echo "what are your lower case letters ("Σ÷ⁿ▀")?";
  2529. read lchars;
  2530. if test "$lchars" = "" ; then
  2531.         lchars=""Σ÷ⁿ▀"";
  2532. fi
  2533.     
  2534. {
  2535. test -n "$verbose" && \
  2536. echo "    defining" LCHARS to be "\"$lchars\""
  2537. echo "#define" LCHARS "\"$lchars\"" >> confdefs.h
  2538. DEFS="$DEFS -DLCHARS=\"$lchars\""
  2539. ac_sed_defs="${ac_sed_defs}\${ac_dA}LCHARS\${ac_dB}LCHARS\${ac_dC}\"$lchars\"\${ac_dD}
  2540. \${ac_uA}LCHARS\${ac_uB}LCHARS\${ac_uC}\"$lchars\"\${ac_uD}
  2541. \${ac_eA}LCHARS\${ac_eB}LCHARS\${ac_eC}\"$lchars\"\${ac_eD}
  2542. "
  2543. }
  2544.  
  2545.     echo "what are your upper case letters ("─╓▄▀")?";
  2546. read uchars;
  2547. if test "$uchars" = "" ; then
  2548.         uchars=""─╓▄▀"";
  2549. fi
  2550.     
  2551. {
  2552. test -n "$verbose" && \
  2553. echo "    defining" UCHARS to be "\"$uchars\""
  2554. echo "#define" UCHARS "\"$uchars\"" >> confdefs.h
  2555. DEFS="$DEFS -DUCHARS=\"$uchars\""
  2556. ac_sed_defs="${ac_sed_defs}\${ac_dA}UCHARS\${ac_dB}UCHARS\${ac_dC}\"$uchars\"\${ac_dD}
  2557. \${ac_uA}UCHARS\${ac_uB}UCHARS\${ac_uC}\"$uchars\"\${ac_uD}
  2558. \${ac_eA}UCHARS\${ac_eB}UCHARS\${ac_eC}\"$uchars\"\${ac_eD}
  2559. "
  2560. }
  2561.  
  2562.     if test "$LEX" != "flex" ; then
  2563.           echo "Note that you can not reconstruct ir/query_l.c from"
  2564.           echo "ir/query_l.l, since you don't have flex!";
  2565.     fi
  2566. else
  2567.     echo "Ok, will use your systems ctype";
  2568. fi
  2569.  
  2570. echo ""
  2571. echo You can compile and link the clients with the capability to
  2572. echo search index files directely. So you need not to install a
  2573. echo server, for local searches. The clients will be greater, but
  2574. echo faster with local searches.
  2575. echo You can not run the test without the switch
  2576.  
  2577. echo "Do you want to compile with -DLOCAL_SEARCH (yes)?";
  2578. read local;
  2579. if test "$local" = "" ; then
  2580.         local="yes";
  2581. fi
  2582.  
  2583. if test "$local" = "yes" ; then
  2584.     echo "Ok, will compile with the -DLOCAL_SEARCH switch"
  2585.     
  2586. {
  2587. test -n "$verbose" && \
  2588. echo "    defining LOCAL_SEARCH"
  2589. echo "#define" LOCAL_SEARCH "1" >> confdefs.h
  2590. DEFS="$DEFS -DLOCAL_SEARCH=1"
  2591. ac_sed_defs="${ac_sed_defs}\${ac_dA}LOCAL_SEARCH\${ac_dB}LOCAL_SEARCH\${ac_dC}1\${ac_dD}
  2592. \${ac_uA}LOCAL_SEARCH\${ac_uB}LOCAL_SEARCH\${ac_uC}1\${ac_uD}
  2593. \${ac_eA}LOCAL_SEARCH\${ac_eB}LOCAL_SEARCH\${ac_eC}1\${ac_eD}
  2594. "
  2595. }
  2596.  
  2597.     LIBLOCAL=../ir/liblocal.a
  2598.     TESTDIR="FIELD-EXAMPLE"
  2599.     
  2600. else
  2601.     echo "Ok, will compile with no -DLOCAL_SEARCH switch"
  2602.     echo "Note: will not be able to run the tests"
  2603. fi
  2604.  
  2605. echo ""
  2606. echo "You can modify the URL document type, to put the URL of the"
  2607. echo "indexed in the document id instead of the headline. If you use"
  2608. echo "this modification you can customize the headline (e.g. with the"
  2609. echo "-t fields option). Also it is not required to keep a copy of the"
  2610. echo "documents for retrieval with the wais server. But currently only"
  2611. echo "SFgate can handle this modified docids. Normal clients will not"
  2612. echo "correctely interprete the docids and try to retrieve the document"
  2613. echo "from a wais instead of the correspondig http server."
  2614. echo ""
  2615.  
  2616. echo "Do you want to use the modified URL handling (no)?";
  2617. read urldocid;
  2618. if test "$urldocid" = "" ; then
  2619.         urldocid="no";
  2620. fi
  2621.  
  2622. if test "$urldocid" = "no" ; then
  2623.     echo "Ok, will use the original doctype URL"
  2624. else
  2625.     echo "Ok, will use the modified URL doctype"
  2626.     echo "Note: you will not be able to retrieve URL documents with"
  2627.     echo "      clients other than SFgate"
  2628.     
  2629. {
  2630. test -n "$verbose" && \
  2631. echo "    defining URLDOCID"
  2632. echo "#define" URLDOCID "1" >> confdefs.h
  2633. DEFS="$DEFS -DURLDOCID=1"
  2634. ac_sed_defs="${ac_sed_defs}\${ac_dA}URLDOCID\${ac_dB}URLDOCID\${ac_dC}1\${ac_dD}
  2635. \${ac_uA}URLDOCID\${ac_uB}URLDOCID\${ac_uC}1\${ac_uD}
  2636. \${ac_eA}URLDOCID\${ac_eB}URLDOCID\${ac_eC}1\${ac_eD}
  2637. "
  2638. }
  2639.  
  2640. fi
  2641.  
  2642. if test "$prefix" = "" ; then
  2643.     prefix="/usr/local/wais";
  2644. fi 
  2645.  
  2646. echo "Where should the installation go ($prefix)?";
  2647. read INSTALLROOT;
  2648. if test "$INSTALLROOT" = "" ; then
  2649.         INSTALLROOT="$prefix";
  2650. fi
  2651. prefix="$INSTALLROOT" 
  2652. echo "Ok, will install in $INSTALLROOT"
  2653.  
  2654.  
  2655. case "$DEFS" in
  2656.     *HAVE_SYS_SHM* )
  2657. echo "
  2658.  
  2659. I added a patch from Alberto Accomazzi for speeding up usage of
  2660. synonym files. He writes about his patch:
  2661.  
  2662. For those of you who have fairly large synonym files (> 10Kb) and are
  2663. running the software on a machine that supports shared memory (your
  2664. machine does) enabling this feature will speed up the waisserver
  2665. response time by a significant factor.
  2666.  
  2667. For those of you who do not have shared memory, I have rewritten the
  2668. memory allocation part of synonym.c so that bigger memory chunks are
  2669. allocated and used rather than allocating memory for each word and
  2670. synonym, so the code should be a little faster for you too.
  2671. "
  2672.  
  2673. echo "Do you want to use shm cache (no)?";
  2674. read CACHE_SYN;
  2675. if test "$CACHE_SYN" = "" ; then
  2676.         CACHE_SYN="no";
  2677. fi
  2678.     if test "$CACHE_SYN" != "no" ; then
  2679.         echo "Ok. The shared memory support will be compiled in."
  2680.         
  2681. {
  2682. test -n "$verbose" && \
  2683. echo "    defining CACHE_SYN"
  2684. echo "#define" CACHE_SYN "1" >> confdefs.h
  2685. DEFS="$DEFS -DCACHE_SYN=1"
  2686. ac_sed_defs="${ac_sed_defs}\${ac_dA}CACHE_SYN\${ac_dB}CACHE_SYN\${ac_dC}1\${ac_dD}
  2687. \${ac_uA}CACHE_SYN\${ac_uB}CACHE_SYN\${ac_uC}1\${ac_uD}
  2688. \${ac_eA}CACHE_SYN\${ac_eB}CACHE_SYN\${ac_eC}1\${ac_eD}
  2689. "
  2690. }
  2691.  
  2692.     else
  2693.         echo "Ok. Will not compile the shared memory support."
  2694.     fi
  2695. ;;
  2696. esac
  2697.  
  2698. echo "
  2699.  
  2700. As distributed, $FREE_WAIS_SF_VERSION_STRING will send an UDP packet
  2701. to my workstation every time waisserver reindexes his info database,
  2702. containing your (numeric) UID, your operating system, your compiler
  2703. version and the $DISTNAME version.
  2704.  
  2705. This is JUST because I would like to get an idea of to which
  2706. systems/compilers $DISTNAME has be ported and how many people use it,
  2707. and keep on using it (rather than "tried it once" folks).  It will
  2708. NEVER become a licensing scheme or some crazy thing like that.  But,
  2709. you can disable it by answering 'yes' to the following question.  If
  2710. you do that, please let me know, if you are running $DISTNAME on a
  2711. system/compiler, which is not mentioned in the README.
  2712. "
  2713.  
  2714. echo "Disable the UDP packet sending (no)?";
  2715. read DO_NOT_TELL_ABOUT_ME;
  2716. if test "$DO_NOT_TELL_ABOUT_ME" = "" ; then
  2717.         DO_NOT_TELL_ABOUT_ME="no";
  2718. fi
  2719. if test "$DO_NOT_TELL_ABOUT_ME" = "yes" ; then
  2720.     
  2721. {
  2722. test -n "$verbose" && \
  2723. echo "    defining DO_NOT_TELL_ABOUT_ME"
  2724. echo "#define" DO_NOT_TELL_ABOUT_ME "1" >> confdefs.h
  2725. DEFS="$DEFS -DDO_NOT_TELL_ABOUT_ME=1"
  2726. ac_sed_defs="${ac_sed_defs}\${ac_dA}DO_NOT_TELL_ABOUT_ME\${ac_dB}DO_NOT_TELL_ABOUT_ME\${ac_dC}1\${ac_dD}
  2727. \${ac_uA}DO_NOT_TELL_ABOUT_ME\${ac_uB}DO_NOT_TELL_ABOUT_ME\${ac_uC}1\${ac_uD}
  2728. \${ac_eA}DO_NOT_TELL_ABOUT_ME\${ac_eB}DO_NOT_TELL_ABOUT_ME\${ac_eC}1\${ac_eD}
  2729. "
  2730. }
  2731.  
  2732.     echo "Ok. I'll respect your privacy."
  2733. else
  2734.     echo "Ok. Thank you for your trust."
  2735. fi 
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747. generate_imake=1
  2748.  
  2749.  
  2750. # Set default prefixes.
  2751. if test -n "$prefix"; then
  2752.   test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
  2753.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  2754. fi
  2755. if test -n "$exec_prefix"; then
  2756.   ac_prsub="$ac_prsub
  2757. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  2758. fi
  2759. # Any assignment to VPATH causes Sun make to only execute
  2760. # the first set of double-colon rules, so remove it if not needed.
  2761. # If there is a colon in the path, we need to keep it.
  2762. if test "x$srcdir" = x.; then
  2763.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2764. fi
  2765.  
  2766. # Quote sed substitution magic chars in DEFS.
  2767. cat >conftest.def <<EOF
  2768. $DEFS
  2769. EOF
  2770. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  2771. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  2772. rm -f conftest.def
  2773. # Substitute for predefined variables.
  2774.  
  2775. trap 'rm -f config.status; exit 1' 1 2 15
  2776. echo creating config.status
  2777. rm -f config.status
  2778. cat > config.status <<EOF
  2779. #!/bin/sh
  2780. # Generated automatically by configure.
  2781. # Run this file to recreate the current configuration.
  2782. # This directory was configured as follows,
  2783. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2784. #
  2785. # $0 $configure_args
  2786.  
  2787. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  2788. for ac_option
  2789. do
  2790.   case "\$ac_option" in
  2791.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2792.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  2793.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  2794.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2795.     echo "config.status generated by autoconf version 1.10"
  2796.     exit 0 ;;
  2797.   -help | --help | --hel | --he | --h)
  2798.     echo "\$ac_cs_usage"; exit 0 ;;
  2799.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2800.   esac
  2801. done
  2802.  
  2803. trap 'rm -fr Install.tmpl Makefile ctype/Makefile regexp/Makefile
  2804. lib/Makefile ir/Makefile ui/Makefile x/Makefile
  2805. FIELD-EXAMPLE/Makefile Defaults.tmpl conftest*; exit 1' 1 2 15
  2806. FREE_WAIS_SF_VERSION='$FREE_WAIS_SF_VERSION'
  2807. DISTNAME='$DISTNAME'
  2808. CFLAGS='$CFLAGS'
  2809. CC='$CC'
  2810. CPP='$CPP'
  2811. PCPP='$PCPP'
  2812. RANLIB='$RANLIB'
  2813. INSTALL='$INSTALL'
  2814. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  2815. INSTALL_DATA='$INSTALL_DATA'
  2816. DIFF='$DIFF'
  2817. LEX='$LEX'
  2818. LEXLIB='$LEXLIB'
  2819. YACC='$YACC'
  2820. UNCOMPRESSOR='$UNCOMPRESSOR'
  2821. UNZIPPER='$UNZIPPER'
  2822. ALLOCA='$ALLOCA'
  2823. TESTDIR='$TESTDIR'
  2824. INSTALLROOT='$INSTALLROOT'
  2825. INC='$INC'
  2826. LFLAGS='$LFLAGS'
  2827. ISOOBJS='$ISOOBJS'
  2828. REGEXPLIB='$REGEXPLIB'
  2829. LIBLOCAL='$LIBLOCAL'
  2830. x_includes='$x_includes'
  2831. x_libraries='$x_libraries'
  2832. SUBDIRS='$SUBDIRS'
  2833. generate_imake='$generate_imake'
  2834. LIBS='$LIBS'
  2835. srcdir='$srcdir'
  2836. top_srcdir='$top_srcdir'
  2837. prefix='$prefix'
  2838. exec_prefix='$exec_prefix'
  2839. ac_prsub='$ac_prsub'
  2840. ac_vpsub='$ac_vpsub'
  2841. extrasub='$extrasub'
  2842. EOF
  2843. cat >> config.status <<\EOF
  2844.  
  2845. ac_given_srcdir=$srcdir
  2846.  
  2847. CONFIG_FILES=${CONFIG_FILES-"Install.tmpl Makefile ctype/Makefile regexp/Makefile
  2848. lib/Makefile ir/Makefile ui/Makefile x/Makefile
  2849. FIELD-EXAMPLE/Makefile"}
  2850. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  2851.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2852.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2853.   if test "$ac_dir" != "$ac_file"; then
  2854.     # The file is in a subdirectory.
  2855.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2856.     ac_dir_suffix="/$ac_dir"
  2857.   else
  2858.     ac_dir_suffix=
  2859.   fi
  2860.  
  2861.   # A "../" for each directory in $ac_dir_suffix.
  2862.   ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2863.   case "$ac_given_srcdir" in
  2864.   .)  srcdir=.; top_srcdir="$ac_dots." ;;
  2865.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2866.   *) # Relative path.
  2867.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2868.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2869.   esac
  2870.  
  2871.   echo creating "$ac_file"
  2872.   rm -f "$ac_file"
  2873.   comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  2874.   case "$ac_file" in
  2875.     *.html ) echo "<!-- $comment_str  -->" > "$ac_file" ;;
  2876.     *.c | *.h | *.C | *.cc | *.m | *.tmpl )  echo "/* $comment_str */" > "$ac_file" ;;
  2877.     * )          echo "# $comment_str"     > "$ac_file" ;;
  2878.   esac
  2879.   sed -e "
  2880. $ac_prsub
  2881. $ac_vpsub
  2882. $extrasub
  2883. s%@FREE_WAIS_SF_VERSION@%$FREE_WAIS_SF_VERSION%g
  2884. s%@DISTNAME@%$DISTNAME%g
  2885. s%@CFLAGS@%$CFLAGS%g
  2886. s%@CC@%$CC%g
  2887. s%@CPP@%$CPP%g
  2888. s%@PCPP@%$PCPP%g
  2889. s%@RANLIB@%$RANLIB%g
  2890. s%@INSTALL@%$INSTALL%g
  2891. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2892. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2893. s%@DIFF@%$DIFF%g
  2894. s%@LEX@%$LEX%g
  2895. s%@LEXLIB@%$LEXLIB%g
  2896. s%@YACC@%$YACC%g
  2897. s%@UNCOMPRESSOR@%$UNCOMPRESSOR%g
  2898. s%@UNZIPPER@%$UNZIPPER%g
  2899. s%@ALLOCA@%$ALLOCA%g
  2900. s%@TESTDIR@%$TESTDIR%g
  2901. s%@INSTALLROOT@%$INSTALLROOT%g
  2902. s%@INC@%$INC%g
  2903. s%@LFLAGS@%$LFLAGS%g
  2904. s%@ISOOBJS@%$ISOOBJS%g
  2905. s%@REGEXPLIB@%$REGEXPLIB%g
  2906. s%@LIBLOCAL@%$LIBLOCAL%g
  2907. s%@x_includes@%$x_includes%g
  2908. s%@x_libraries@%$x_libraries%g
  2909. s%@SUBDIRS@%$SUBDIRS%g
  2910. s%@generate_imake@%$generate_imake%g
  2911. s%@LIBS@%$LIBS%g
  2912. s%@srcdir@%$srcdir%g
  2913. s%@top_srcdir@%$top_srcdir%g
  2914. s%@prefix@%$prefix%g
  2915. s%@exec_prefix@%$exec_prefix%g
  2916. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  2917. fi; done
  2918.  
  2919. # These sed commands are put into ac_sed_defs when defining a macro.
  2920. # They are broken into pieces to make the sed script easier to manage.
  2921. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  2922. # is the cpp macro being defined and VALUE is the value it is being given.
  2923. # Each defining turns into a single global substitution command.
  2924. # Hopefully no one uses "!" as a variable value.
  2925. # Other candidates for the sed separators, like , and @, do get used.
  2926. #
  2927. # ac_d sets the value in "#define NAME VALUE" lines.
  2928. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2929. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  2930. ac_dC='\3'
  2931. ac_dD='!g'
  2932. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2933. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2934. ac_uB='\([     ]\)!\1#\2define\3'
  2935. ac_uC=' '
  2936. ac_uD='\4!g'
  2937. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2938. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2939. ac_eB='$!\1#\2define\3'
  2940. ac_eC=' '
  2941. ac_eD='!g'
  2942. rm -f conftest.sed
  2943. EOF
  2944. # Turn off quoting long enough to insert the sed commands.
  2945. rm -f conftest.sh
  2946. cat > conftest.sh <<EOF
  2947. $ac_sed_defs
  2948. EOF
  2949.  
  2950. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  2951. # on the size of here documents.
  2952.  
  2953. # Maximum number of lines to put in a single here document.
  2954. ac_max_sh_lines=9
  2955.  
  2956. while :
  2957. do
  2958.   # wc gives bogus results for an empty file on some AIX systems.
  2959.   ac_lines=`grep -c . conftest.sh`
  2960.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2961.   rm -f conftest.s1 conftest.s2
  2962.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
  2963.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
  2964.   # Write a limited-size here document to append to conftest.sed.
  2965.   echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  2966.   cat conftest.s1 >> config.status
  2967.   echo 'CONFEOF' >> config.status
  2968.   rm -f conftest.s1 conftest.sh
  2969.   mv conftest.s2 conftest.sh
  2970. done
  2971. rm -f conftest.sh
  2972.  
  2973. # Now back to your regularly scheduled config.status.
  2974. cat >> config.status <<\EOF
  2975. # This sed command replaces #undef's with comments.  This is necessary, for
  2976. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2977. # on some systems where configure will not decide to define it in
  2978. # Defaults.tmpl.
  2979. cat >> conftest.sed <<\CONFEOF
  2980. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  2981. CONFEOF
  2982. rm -f conftest.h
  2983. # Break up the sed commands because old seds have small limits.
  2984. ac_max_sed_lines=20
  2985.  
  2986. CONFIG_HEADERS=${CONFIG_HEADERS-"Defaults.tmpl"}
  2987. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  2988.   echo creating $ac_file
  2989.  
  2990.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  2991.   cp conftest.sed conftest.stm
  2992.   while :
  2993.   do
  2994.     ac_lines=`grep -c . conftest.stm`
  2995.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2996.     rm -f conftest.s1 conftest.s2 conftest.h2
  2997.     sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
  2998.     sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
  2999.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  3000.     rm -f conftest.s1 conftest.h1 conftest.stm
  3001.     mv conftest.h2 conftest.h1
  3002.     mv conftest.s2 conftest.stm
  3003.   done
  3004.   rm -f conftest.stm conftest.h
  3005.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3006.   cat conftest.h1 >> conftest.h
  3007.   rm -f conftest.h1
  3008.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3009.     # The file exists and we would not be changing it.
  3010.     echo "$ac_file is unchanged"
  3011.     rm -f conftest.h
  3012.   else
  3013.     rm -f $ac_file
  3014.     mv conftest.h $ac_file
  3015.   fi
  3016. fi; done
  3017. rm -f conftest.sed
  3018.  
  3019.  
  3020.  
  3021. exit 0
  3022. EOF
  3023. chmod +x config.status
  3024. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
  3025.  
  3026.  
  3027. echo 
  3028. echo finished setup 
  3029. echo "
  3030.  
  3031. Compile with 'make'.
  3032.  
  3033. Install with 'make install' and 'make install.man'. If you want to
  3034. link the wais libraries into other systems (Mosaic, gopher) then type
  3035. 'make install.lib' before cleaning with 'make clean'. 'make veryclean'
  3036. will in addition remove the tests databases in FIELD-EXAMPLE and the
  3037. files generated by flex, bison, latex, dvips.
  3038.  
  3039. If you have imake you can alternatively enter
  3040.  
  3041. 'xmkmf -a'
  3042. 'make'
  3043. 'make install'
  3044. 'make install.man'
  3045. 'make install.lib'
  3046.  
  3047. In the x subdirectory the latter is preferred.
  3048.  
  3049. Note, that the Makefiles created by this script do not contain any
  3050. dependencies.  If you change some setting, recomplile the whole
  3051. distribution or use imake/makedepend to generate the dependencies.
  3052.  
  3053. To recreate the autoconf Makefiles enter
  3054.  
  3055. 'config.status'
  3056.  
  3057. Good luck!
  3058. ";
  3059.